mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-11 02:46:56 +01:00
* [DEV] UI tweaks
* [DEV] Fixed eventlog pager issue
This commit is contained in:
@@ -265,7 +265,7 @@ class ConfigData implements JsonSerializable
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $siteLang = 'es_ES';
|
||||
private $siteLang = '';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
||||
@@ -313,6 +313,7 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
$this->view->assign('errors', $errors);
|
||||
|
||||
$this->view->assign('langsAvailable', Language::getAvailableLanguages());
|
||||
$this->view->assign('langBrowser', Language::$globalLang);
|
||||
|
||||
$this->view->addTemplate('install');
|
||||
$this->view->addTemplate('body-footer');
|
||||
@@ -338,6 +339,8 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
*/
|
||||
public function getPassReset()
|
||||
{
|
||||
$this->view->addTemplate('body-header');
|
||||
|
||||
if (Checks::mailIsEnabled() || Request::analyze('f', 0) === 1) {
|
||||
$this->view->addTemplate('passreset');
|
||||
|
||||
@@ -347,8 +350,6 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
|
||||
$this->view->assign('passReset', $this->view->action === 'passreset' && $this->view->hash && $this->view->time);
|
||||
} else {
|
||||
$this->view->assign('showLogo', true);
|
||||
|
||||
$this->showError(self::ERR_UNAVAILABLE, false);
|
||||
}
|
||||
|
||||
@@ -361,6 +362,7 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
*/
|
||||
public function getUpgrade()
|
||||
{
|
||||
$this->view->addTemplate('body-header');
|
||||
$this->view->addTemplate('upgrade');
|
||||
$this->view->addTemplate('body-footer');
|
||||
$this->view->addTemplate('body-end');
|
||||
@@ -375,6 +377,8 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
*/
|
||||
public function get2FA()
|
||||
{
|
||||
$this->view->addTemplate('body-header');
|
||||
|
||||
if (Request::analyze('f', 0) === 1) {
|
||||
$this->view->addTemplate('login-2fa');
|
||||
|
||||
@@ -382,8 +386,6 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
$this->view->assign('userId', Request::analyze('i'));
|
||||
$this->view->assign('time', Request::analyze('t'));
|
||||
} else {
|
||||
$this->view->assign('showLogo', true);
|
||||
|
||||
$this->showError(self::ERR_UNAVAILABLE, false);
|
||||
}
|
||||
|
||||
@@ -449,23 +451,26 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
|
||||
$hash = Request::analyze('h');
|
||||
|
||||
$PublicLink = PublicLink::getItem()->getByHash($hash);
|
||||
if ($hash) {
|
||||
$PublicLink = PublicLink::getItem()->getByHash($hash);
|
||||
|
||||
$this->view->assign('showLogo', true);
|
||||
if (!$PublicLink
|
||||
|| time() > $PublicLink->getDateExpire()
|
||||
|| $PublicLink->getCountViews() >= $PublicLink->getMaxCountViews()
|
||||
) {
|
||||
$this->showError(self::ERR_PAGE_NO_PERMISSION, false);
|
||||
} else {
|
||||
PublicLink::getItem($PublicLink)->addLinkView();
|
||||
|
||||
if (!$PublicLink
|
||||
|| time() > $PublicLink->getDateExpire()
|
||||
|| $PublicLink->getCountViews() >= $PublicLink->getMaxCountViews()
|
||||
) {
|
||||
$this->showError(self::ERR_PAGE_NO_PERMISSION, false);
|
||||
$controller = new AccountController($this->view, null, $PublicLink->getItemId());
|
||||
$controller->getAccountFromLink($PublicLink);
|
||||
}
|
||||
|
||||
$this->getSessionBar();
|
||||
} else {
|
||||
PublicLink::getItem($PublicLink)->addLinkView();
|
||||
|
||||
$controller = new AccountController($this->view, null, $PublicLink->getItemId());
|
||||
$controller->getAccountFromLink($PublicLink);
|
||||
$this->showError(self::ERR_PAGE_NO_PERMISSION, false);
|
||||
}
|
||||
|
||||
$this->getSessionBar();
|
||||
$this->view->addTemplate('body-footer');
|
||||
$this->view->addTemplate('body-end');
|
||||
}
|
||||
|
||||
@@ -73,12 +73,12 @@ class SPException extends Exception
|
||||
*/
|
||||
public static function getExceptionTypeName($type)
|
||||
{
|
||||
$typeName = array(
|
||||
$typeName = [
|
||||
self::SP_OK => 'ok',
|
||||
self::SP_CRITICAL => 'critical',
|
||||
self::SP_WARNING => 'warning',
|
||||
self::SP_ERROR => 'error'
|
||||
);
|
||||
];
|
||||
|
||||
return $typeName[$type];
|
||||
}
|
||||
|
||||
@@ -28,10 +28,8 @@ namespace SP\Core;
|
||||
use SP\Auth\Auth;
|
||||
use SP\Config\Config;
|
||||
use SP\Config\ConfigDB;
|
||||
use SP\Controller;
|
||||
use SP\Controller\MainController;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\DataModel\UserData;
|
||||
use SP\Http\Request;
|
||||
use SP\Log\Email;
|
||||
use SP\Log\Log;
|
||||
@@ -128,6 +126,15 @@ class Init
|
||||
return;
|
||||
}
|
||||
|
||||
// Volver a cargar la configuración si se recarga la página
|
||||
if (Request::checkReload()) {
|
||||
Config::loadConfig(true);
|
||||
|
||||
// Restablecer el idioma y el tema visual
|
||||
Language::setLanguage(true);
|
||||
DiFactory::getTheme()->initTheme(true);
|
||||
}
|
||||
|
||||
// Comprobar si está instalado
|
||||
self::checkInstalled();
|
||||
|
||||
@@ -158,33 +165,21 @@ class Init
|
||||
Session::setUserData();
|
||||
}
|
||||
|
||||
// Comprobar si se ha identificado mediante el servidor web y el usuario coincide
|
||||
if (self::isLoggedIn() && !Auth::checkServerAuthUser(Session::getUserData()->getUserLogin())) {
|
||||
self::logout();
|
||||
// Si es una petición AJAX
|
||||
if (Request::analyze('isAjax', false, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Manejar la redirección para usuarios logeados
|
||||
if (Request::analyze('redirect_url', '', true) && self::isLoggedIn()) {
|
||||
$location = 'index.php';
|
||||
|
||||
// Denegar la regirección si la URL contiene una @
|
||||
if (self::isLoggedIn()) {
|
||||
// Comprobar si se ha identificado mediante el servidor web y el usuario coincide
|
||||
if (!Auth::checkServerAuthUser(Session::getUserData()->getUserLogin())) {
|
||||
self::logout();
|
||||
// Denegar la redirección si la URL contiene una @
|
||||
// Esto previene redirecciones como ?redirect_url=:user@domain.com
|
||||
if (strpos($location, '@') === false) {
|
||||
header('Location: ' . $location);
|
||||
return;
|
||||
} elseif (Request::analyze('redirect_url', '', true) && strpos('index.php', '@') === false) {
|
||||
header('Location: ' . 'index.php');
|
||||
}
|
||||
}
|
||||
|
||||
// Volver a cargar la configuración si se recarga la página
|
||||
if (Request::checkReload()) {
|
||||
Config::loadConfig(true);
|
||||
|
||||
// Restablecer el idioma y el tema visual
|
||||
Language::setLanguage();
|
||||
DiFactory::getTheme()->initTheme();
|
||||
}
|
||||
|
||||
if (self::isLoggedIn() || Request::analyze('isAjax', false, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -658,6 +653,8 @@ class Init
|
||||
* Comprobar si hay que ejecutar acciones de URL antes de presentar la pantalla de login.
|
||||
*
|
||||
* @return bool
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
* @throws \SP\Core\Exceptions\FileNotFoundException
|
||||
*/
|
||||
public static function checkPreLoginActions()
|
||||
{
|
||||
|
||||
@@ -65,11 +65,12 @@ class Language
|
||||
self::$userLang = $Language->getUserLang();
|
||||
self::$globalLang = $Language->getGlobalLang();
|
||||
|
||||
$lang = (self::$userLang) ? self::$userLang : self::$globalLang;
|
||||
$lang = self::$userLang ?: self::$globalLang;
|
||||
|
||||
Session::setLocale($lang);
|
||||
}
|
||||
|
||||
|
||||
self::setLocales($lang);
|
||||
}
|
||||
|
||||
@@ -97,11 +98,11 @@ class Language
|
||||
// Establecer a en_US si no existe la traducción o no es español
|
||||
if (!$configLang
|
||||
&& !$this->checkLangFile($browserLang)
|
||||
&& !preg_match('/^es_.*/i', $browserLang)
|
||||
&& strpos($browserLang, 'es_') === false
|
||||
) {
|
||||
$lang = 'en_US';
|
||||
} else {
|
||||
$lang = ($configLang) ? $configLang : $browserLang;
|
||||
$lang = $configLang ?: $browserLang;
|
||||
}
|
||||
|
||||
return $lang;
|
||||
@@ -114,7 +115,7 @@ class Language
|
||||
*/
|
||||
private function getBrowserLang()
|
||||
{
|
||||
return str_replace("-", "_", substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 5));
|
||||
return str_replace('-', '_', substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 5));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,12 +138,12 @@ class Language
|
||||
{
|
||||
$lang .= '.utf8';
|
||||
|
||||
putenv("LANG=" . $lang);
|
||||
putenv('LANG=' . $lang);
|
||||
setlocale(LC_MESSAGES, $lang);
|
||||
setlocale(LC_ALL, $lang);
|
||||
bindtextdomain("messages", LOCALES_PATH);
|
||||
textdomain("messages");
|
||||
bind_textdomain_codeset("messages", 'UTF-8');
|
||||
bindtextdomain('messages', LOCALES_PATH);
|
||||
textdomain('messages');
|
||||
bind_textdomain_codeset('messages', 'UTF-8');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,13 +153,13 @@ class Language
|
||||
*/
|
||||
public static function getAvailableLanguages()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
'Español' => 'es_ES',
|
||||
'Catalá' => 'ca_ES',
|
||||
'English' => 'en_US',
|
||||
'Deutsch' => 'de_DE',
|
||||
'Magyar' => 'hu_HU',
|
||||
'Français' => 'fr_FR'
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -109,6 +109,10 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
protected $iconSettings;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconHeadline;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconInfo;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconCritical;
|
||||
|
||||
/**
|
||||
* Icons constructor.
|
||||
@@ -445,4 +449,36 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
{
|
||||
$this->iconHeadline = $iconHeadline;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
public function getIconInfo()
|
||||
{
|
||||
return $this->iconInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconInfo
|
||||
*/
|
||||
public function setIconInfo($iconInfo)
|
||||
{
|
||||
$this->iconInfo = $iconInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
public function getIconCritical()
|
||||
{
|
||||
return $this->iconCritical;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconCritical
|
||||
*/
|
||||
public function setIconCritical($iconCritical)
|
||||
{
|
||||
$this->iconCritical = $iconCritical;
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,6 @@
|
||||
namespace SP\Log;
|
||||
|
||||
use SP\Core\DiFactory;
|
||||
use SP\Core\Init;
|
||||
use SP\Storage\DB;
|
||||
use SP\Core\Session;
|
||||
use SP\Storage\QueryData;
|
||||
@@ -54,22 +53,13 @@ class Log extends ActionLog
|
||||
*/
|
||||
public static function getEvents($start, $count)
|
||||
{
|
||||
$query = 'SELECT ' .
|
||||
'log_id,' .
|
||||
'FROM_UNIXTIME(log_date) AS log_date,' .
|
||||
'log_action,' .
|
||||
'log_level,' .
|
||||
'log_login,' .
|
||||
'log_ipAddress,' .
|
||||
'log_description ' .
|
||||
'FROM log ' .
|
||||
'ORDER BY log_id DESC ' .
|
||||
'LIMIT :start, :count';
|
||||
|
||||
$Data = new QueryData();
|
||||
$Data->setQuery($query);
|
||||
$Data->addParam($start, 'start');
|
||||
$Data->addParam($count, 'count');
|
||||
$Data->setSelect('log_id,FROM_UNIXTIME(log_date) AS log_date,log_action,log_level,log_login,log_ipAddress,log_description');
|
||||
$Data->setFrom('log');
|
||||
$Data->setOrder('log_id DESC');
|
||||
$Data->setLimit('?, ?');
|
||||
$Data->addParam($start);
|
||||
$Data->addParam($count);
|
||||
|
||||
// Obtenemos el número total de registros
|
||||
DB::setFullRowCount();
|
||||
|
||||
@@ -357,7 +357,7 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
|
||||
/**
|
||||
* @param $hash int
|
||||
* @return PublicLinkData
|
||||
* @return bool|PublicLinkData
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
*/
|
||||
public function getByHash($hash)
|
||||
@@ -377,21 +377,23 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
|
||||
if ($queryRes === false) {
|
||||
throw new SPException(SPException::SP_ERROR, _('Error al obtener enlace'));
|
||||
} elseif (count($queryRes) > 0) {
|
||||
/**
|
||||
* @var $queryRes PublicLinkBaseData
|
||||
* @var $PublicLink PublicLinkData
|
||||
*/
|
||||
$PublicLink = unserialize($queryRes->getPublicLinkLinkData());
|
||||
|
||||
if (get_class($PublicLink) === '__PHP_Incomplete_Class') {
|
||||
$PublicLink = Util::castToClass($this->getDataModel(), $PublicLink);
|
||||
}
|
||||
|
||||
$PublicLink->setPublicLinkId($queryRes->getPublicLinkId());
|
||||
|
||||
return $PublicLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var $queryRes PublicLinkBaseData
|
||||
* @var $PublicLink PublicLinkData
|
||||
*/
|
||||
$PublicLink = unserialize($queryRes->getPublicLinkLinkData());
|
||||
|
||||
if (get_class($PublicLink) === '__PHP_Incomplete_Class') {
|
||||
$PublicLink = Util::castToClass($this->getDataModel(), $PublicLink);
|
||||
}
|
||||
|
||||
$PublicLink->setPublicLinkId($queryRes->getPublicLinkId());
|
||||
|
||||
return $PublicLink;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.alertify-logs>*.error{background:#f44336 !important;background:rgba(244,67,54,.9) !important}.alertify-logs>*.success{background:#009688;background:rgba(0,150,136,.9) !important}.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button).ok,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button).ok{color:#fff;background-color:#009688;background-color:rgba(0,150,136,.9) !important}.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button).cancel,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button).cancel{color:#fff;background:#f44336 !important;background:rgba(244,67,54,.9) !important}
|
||||
@@ -116,10 +116,21 @@ i {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
form .form-field label {
|
||||
display: inline-block;
|
||||
width: 10em;
|
||||
form .form-field {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
form .form-field > label {
|
||||
min-width: 12em;
|
||||
padding: .5em 0;
|
||||
font-size: 16px;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
form .form-field > div {
|
||||
width: 100%;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.altTable {
|
||||
@@ -883,60 +894,10 @@ pre, code, samp, kbd {
|
||||
border-bottom: #d9d9d9 1px solid
|
||||
}
|
||||
|
||||
#fancyMsg {
|
||||
min-width: 250px;
|
||||
height: 150px;
|
||||
background-color: #f5f5f5;
|
||||
font-family: Verdana, Arial;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
line-height: 20px;
|
||||
padding: 0 15px;
|
||||
border-radius: 25px;
|
||||
-moz-border-radius: 25px;
|
||||
-webkit-border-radius: 25px
|
||||
}
|
||||
|
||||
#fancyMsg table {
|
||||
border: 0;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
#fancyMsg td {
|
||||
border-bottom: #d9d9d9 1px solid
|
||||
}
|
||||
|
||||
#fancyMsg.msgError {
|
||||
background: url('../imgs/bg_msg_error.png') white repeat-x;
|
||||
color: #c00
|
||||
}
|
||||
|
||||
#fancyMsg.msgOk {
|
||||
background: url('../imgs/bg_msg_ok.png') white repeat-x;
|
||||
color: green
|
||||
}
|
||||
|
||||
#fancyMsg.msgWarn {
|
||||
background: url('../imgs/bg_msg_warn.png') white repeat-x;
|
||||
color: orange
|
||||
}
|
||||
|
||||
#fancyMsg.msgInfo {
|
||||
background: url('../imgs/bg_msg_info.png') white repeat-x;
|
||||
color: #555
|
||||
}
|
||||
|
||||
#fancyView a, #fancyMsg a {
|
||||
color: #555
|
||||
}
|
||||
|
||||
|
||||
#fancyContainer {
|
||||
width: auto;
|
||||
max-width: 50em;
|
||||
@@ -1560,7 +1521,7 @@ fieldset.warning a {
|
||||
margin: 0 auto;
|
||||
list-style: none;
|
||||
font-size: 14px;
|
||||
text-align: left
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#actions ul.errors > li {
|
||||
@@ -1569,50 +1530,51 @@ fieldset.warning a {
|
||||
padding: .5em
|
||||
}
|
||||
|
||||
#actions ul.errors > li.err_critical {
|
||||
color: #b94a48;
|
||||
background: #fed7d7;
|
||||
border: 1px solid red
|
||||
#actions ul.errors > li.error-critical {
|
||||
color: #ef5350;
|
||||
background-color: #ffcdd2;
|
||||
border: 1px solid #ef5350;
|
||||
}
|
||||
|
||||
#actions ul.errors > li.err_warning {
|
||||
color: orange;
|
||||
background: #fff2d9;
|
||||
border: #ffe5b3 1px solid
|
||||
#actions ul.errors > li.error-warning {
|
||||
color: #ffca28;
|
||||
background-color: #fff8e1;
|
||||
border: 1px solid #ffca28;
|
||||
}
|
||||
|
||||
#actions ul.errors > li.err_ok {
|
||||
color: green;
|
||||
background: #ecfde4;
|
||||
border: #dbfdcb 1px solid;
|
||||
font-weight: bold
|
||||
#actions ul.errors > li.error-ok {
|
||||
color: #26a69a;
|
||||
background-color: #b2dfdb;
|
||||
border: 1px solid #26a69a;
|
||||
}
|
||||
|
||||
#actions ul.errors > li > p.hint {
|
||||
background-image: url('../imgs/info.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #777;
|
||||
padding-left: 25px;
|
||||
background-position: 0 .3em;
|
||||
color: #aaa;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
#actions ul.errors > li > p.hint i{
|
||||
margin-right: .5em;
|
||||
}
|
||||
|
||||
#actions form {
|
||||
width: 450px;
|
||||
margin: 0 auto;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
#actions form fieldset {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
#actions form fieldset legend {
|
||||
width: 100%;
|
||||
margin-top: 1em;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background-color: #607d8b;
|
||||
margin-bottom: 1em;
|
||||
border-radius: 5px;
|
||||
margin: 1em 0;
|
||||
letter-spacing: .2em;
|
||||
padding: .2em 0
|
||||
}
|
||||
|
||||
2
inc/themes/material-blue/css/styles.min.css
vendored
2
inc/themes/material-blue/css/styles.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -9,6 +9,14 @@
|
||||
filter: none;
|
||||
}
|
||||
|
||||
#toast-container.toast-top-center > div,
|
||||
#toast-container.toast-bottom-center > div {
|
||||
width: 50%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.toast {
|
||||
background-color: #030303;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ class Icons extends ThemeIconsBase
|
||||
$this->iconGroup = new FontIcon('group_work', 'mdl-color-text--indigo-A200');
|
||||
$this->iconSettings = new FontIcon('settings_applications', 'mdl-color-text--indigo-A200', _('Configuración'));
|
||||
$this->iconHeadline = new FontIcon('view_headline', 'mdl-color-text--indigo-A200');
|
||||
$this->iconInfo = new FontIcon('info_outline', 'mdl-color-text--indigo-A200', _('Información'));
|
||||
$this->iconCritical = new FontIcon('error_outline', 'mdl-color-text--red-A200', _('Crítico'));
|
||||
|
||||
// Iconos de Navegación
|
||||
$this->iconNavPrev = new FontIcon('chevron_left', null, _('Página anterior'));
|
||||
|
||||
@@ -418,12 +418,7 @@ sysPass.Theme = function (Common) {
|
||||
},
|
||||
common: function ($container) {
|
||||
passwordDetect($container);
|
||||
activeTooltip($container);
|
||||
setupDatePicker($container);
|
||||
|
||||
$container.find(".download").button({
|
||||
icons: {primary: "ui-icon-arrowthickstop-1-s"}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
30
inc/themes/material-blue/js/app-theme.min.js
vendored
30
inc/themes/material-blue/js/app-theme.min.js
vendored
@@ -1,18 +1,18 @@
|
||||
var $jscomp={scope:{},findInternal:function(a,f,c){a instanceof String&&(a=String(a));for(var g=a.length,h=0;h<g;h++){var m=a[h];if(f.call(c,m,h,a))return{i:h,v:m}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.value)};
|
||||
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,c,g){if(f){c=$jscomp.global;a=a.split(".");for(g=0;g<a.length-1;g++){var h=a[g];h in c||(c[h]={});c=c[h]}a=a[a.length-1];g=c[a];f=f(g);f!=g&&null!=f&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:f})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");
|
||||
sysPass.Theme=function(a){var f=a.log,c=function(a){"undefined"===typeof a&&(a=$("body"));a.find(".active-tooltip").tooltip({content:function(){return $(this).attr("title")},tooltipClass:"tooltip"})},g=function(b){for(var l=0,e="",d;l<a.passwordData.complexity.numlength;){d=Math.floor(100*Math.random())%94+33;if(!a.passwordData.complexity.symbols){if(33<=d&&47>=d)continue;if(58<=d&&64>=d)continue;if(91<=d&&96>=d)continue;if(123<=d&&126>=d)continue}!a.passwordData.complexity.numbers&&48<=d&&57>=d||
|
||||
!a.passwordData.complexity.uppercase&&65<=d&&90>=d||(l++,e+=String.fromCharCode(d))}$("#viewPass").attr("title",e);var k=zxcvbn(e);a.passwordData.passLength=e.length;b?(l=b.parent(),d=$("#"+b.attr("id")+"R"),a.outputResult(k,b),b=new MaterialTextfield,l.find("input:password").val(e),l.addClass(b.CssClasses_.IS_DIRTY).removeClass(b.CssClasses_.IS_INVALID),d.val(e).parent().addClass(b.CssClasses_.IS_DIRTY).removeClass(b.CssClasses_.IS_INVALID),a.encryptFormValue(d),l.find("#passLevel").show(500)):(a.outputResult(k),
|
||||
var $jscomp={scope:{},findInternal:function(a,f,d){a instanceof String&&(a=String(a));for(var g=a.length,h=0;h<g;h++){var m=a[h];if(f.call(d,m,h,a))return{i:h,v:m}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,d){if(d.get||d.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[f]=d.value)};
|
||||
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,d,g){if(f){d=$jscomp.global;a=a.split(".");for(g=0;g<a.length-1;g++){var h=a[g];h in d||(d[h]={});d=d[h]}a=a[a.length-1];g=d[a];f=f(g);f!=g&&null!=f&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:f})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6-impl","es3");
|
||||
sysPass.Theme=function(a){var f=a.log,d=function(a){"undefined"===typeof a&&(a=$("body"));a.find(".active-tooltip").tooltip({content:function(){return $(this).attr("title")},tooltipClass:"tooltip"})},g=function(b){for(var l=0,e="",c;l<a.passwordData.complexity.numlength;){c=Math.floor(100*Math.random())%94+33;if(!a.passwordData.complexity.symbols){if(33<=c&&47>=c)continue;if(58<=c&&64>=c)continue;if(91<=c&&96>=c)continue;if(123<=c&&126>=c)continue}!a.passwordData.complexity.numbers&&48<=c&&57>=c||
|
||||
!a.passwordData.complexity.uppercase&&65<=c&&90>=c||(l++,e+=String.fromCharCode(c))}$("#viewPass").attr("title",e);var k=zxcvbn(e);a.passwordData.passLength=e.length;b?(l=b.parent(),c=$("#"+b.attr("id")+"R"),a.outputResult(k,b),b=new MaterialTextfield,l.find("input:password").val(e),l.addClass(b.CssClasses_.IS_DIRTY).removeClass(b.CssClasses_.IS_INVALID),c.val(e).parent().addClass(b.CssClasses_.IS_DIRTY).removeClass(b.CssClasses_.IS_INVALID),a.encryptFormValue(c),l.find("#passLevel").show(500)):(a.outputResult(k),
|
||||
$("input:password, input.password").val(e),$("#passLevel").show(500))},h=function(){$("<div></div>").dialog({modal:!0,title:a.config().LANG[29],width:"400px",open:function(){var b=$(this),l='<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-numbers"><input type="checkbox" id="checkbox-numbers" class="mdl-checkbox__input" name="checkbox-numbers"/><span class="mdl-checkbox__label">'+a.config().LANG[35]+'</span></label><label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-uppercase"><input type="checkbox" id="checkbox-uppercase" class="mdl-checkbox__input" name="checkbox-uppercase"/><span class="mdl-checkbox__label">'+
|
||||
a.config().LANG[36]+'</span></label><label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-symbols"><input type="checkbox" id="checkbox-symbols" class="mdl-checkbox__input" name="checkbox-symbols"/><span class="mdl-checkbox__label">'+a.config().LANG[37]+'</span></label><div class="mdl-textfield mdl-js-textfield textfield-passlength"><input class="mdl-textfield__input" type="number" pattern="[0-9]*" id="passlength" /><label class="mdl-textfield__label" for="passlength">'+a.config().LANG[38]+
|
||||
'</label></div><button id="btn-complexity" class="mdl-button mdl-js-button mdl-button--raised">Ok</button>';b.html(l);b.dialog("option","position","center");b.ready(function(){$("#checkbox-numbers").prop("checked",a.passwordData.complexity.numbers);$("#checkbox-uppercase").prop("checked",a.passwordData.complexity.uppercase);$("#checkbox-symbols").prop("checked",a.passwordData.complexity.symbols);$("#passlength").val(a.passwordData.complexity.numlength);$("#btn-complexity").click(function(){a.passwordData.complexity.numbers=
|
||||
$(" #checkbox-numbers").is(":checked");a.passwordData.complexity.uppercase=$("#checkbox-uppercase").is(":checked");a.passwordData.complexity.symbols=$("#checkbox-symbols").is(":checked");a.passwordData.complexity.numlength=parseInt($("#passlength").val());b.dialog("close")});componentHandler.upgradeDom()})},close:function(){$(this).dialog("destroy")}})},m=function(b){b.find(".passwordfield__input").each(function(){var b=$(this);if("true"!==b.attr("data-pass-upgraded")){var e=b.parent(),d=b.attr("id"),
|
||||
k=$("#"+d+"R"),c='<button id="menu-speed-'+d+'" class="mdl-button mdl-js-button mdl-button--icon" type="button" title="'+a.config().LANG[27]+'"><i class="material-icons">more_vert</i></button>',c=c+('<ul class="mdl-menu mdl-js-menu" for="menu-speed-'+d+'">')+('<li class="mdl-menu__item passGen"><i class="material-icons">settings</i>'+a.config().LANG[28]+"</li>"),c=c+('<li class="mdl-menu__item passComplexity"><i class="material-icons">vpn_key</i>'+a.config().LANG[29]+"</li>"),c=c+('<li class="mdl-menu__item reset"><i class="material-icons">refresh</i>'+
|
||||
a.config().LANG[30]+"</li>");e.after('<div class="password-actions" />');e.next(".password-actions").prepend('<span class="passLevel passLevel-'+d+' fullround" title="'+a.config().LANG[31]+'"></span>').prepend('<i class="showpass material-icons" title="'+a.config().LANG[32]+'">remove_red_eye</i>').prepend(c);b.on("keyup",function(){a.checkPassLevel(b)});e=b.parent().next();e.find(".passGen").on("click",function(){g(b);b.focus()});e.find(".passComplexity").on("click",function(){h()});e.find(".showpass").on("mouseover",
|
||||
function(){$(this).attr("title",b.val())});e.find(".reset").on("click",function(){b.val("");k.val("");componentHandler.upgradeDom()});b.attr("data-pass-upgraded","true")}});b.find(".passwordfield__input-show").each(function(){var b=$(this),c=b.parent(),b=b.attr("id");c.after('<i class="showpass material-icons" title="'+a.config().LANG[32]+'" data-targetid="'+b+'">remove_red_eye</i>')})},n=function(b){f.info("setupDatePicker");var c={format:"YYYY-MM-DD",lang:a.config().LOCALE.substr(0,2),time:!1,cancelText:a.config().LANG[44],
|
||||
okText:a.config().LANG[43],clearText:a.config().LANG[30],nowText:a.config().LANG[56],minDate:new Date,triggerEvent:"dateIconClick"},e=function(b){f.info(moment.tz("UTC"));f.info(a.config().TIMEZONE);return moment(b).tz(a.config().TIMEZONE).format("X")};b.find(".password-datefield__input").each(function(){var a=$(this);a.bootstrapMaterialDatePicker(c);a.parent().append("<input type='hidden' name='passworddatechange_unix' value='"+e(a.val())+"' />");a.parent().next("i").on("click",function(){a.trigger("dateIconClick")});
|
||||
a.on("change",function(){var b;b=e(a.val());a.parent().find("input[name='passworddatechange_unix']").val(b)})})};c();return{activeTooltip:c,passwordDetect:m,password:g,viewsTriggers:{search:function(){var b=$("#frmSearch"),c=$("#res-content");b.find(".icon-searchfav").on("click",function(){var k=$(this).find("i"),c=b.find("input[name='searchfav']");0==c.val()?(k.addClass("mdl-color-text--amber-A200"),k.attr("title",a.config().LANG[53]),c.val(1)):(k.removeClass("mdl-color-text--amber-A200"),k.attr("title",
|
||||
a.config().LANG[52]),c.val(0));b.submit()});var e=b.find("#tags")[0],d=b.find("i.show-filter");c.on("click","#data-search-header .sort-down,#data-search-header .sort-up",function(){var b=$(this);b.parent().find("a").addClass("filterOn");a.appActions().account.sort(b)}).on("click","#search-rows i.icon-favorite",function(){var b=$(this);a.appActions().account.savefavorite(b,function(){"on"===b.data("status")?(b.addClass("mdl-color-text--amber-A100"),b.attr("title",a.config().LANG[50]),b.html("star")):
|
||||
(b.removeClass("mdl-color-text--amber-A100"),b.attr("title",a.config().LANG[49]),b.html("star_border"))})}).on("click","#search-rows span.tag",function(){0==d.data("state")&&d.trigger("click");e.selectize.addItem($(this).data("tag-id"))});d.on("click",function(){var a=$(this),c=b.find(".search-filters-tags");0==a.data("state")?(c.show("slow"),a.data("state","1"),a.html(a.data("icon-up"))):(c.hide("slow"),a.data("state","0"),a.html(a.data("icon-down")))});0<e.selectedOptions.length&&d.trigger("click")},
|
||||
common:function(a){m(a);c(a);n(a);a.find(".download").button({icons:{primary:"ui-icon-arrowthickstop-1-s"}})}},loading:{show:function(){$("#wrap-loading").show();$("#loading").addClass("is-active")},hide:function(){$("#wrap-loading").hide();$("#loading").removeClass("is-active")}},ajax:{complete:function(){f.info("ajax:complete");componentHandler.upgradeDom()}},html:{getList:function(a){var b=$('<ul class="ldap-list-item mdl-list"></ul>'),c=$('<li class="mdl-list__item"></li>'),d=$('<span class="mdl-list__item-primary-content"></span>');
|
||||
a.forEach(function(a){var e=d.clone();e.append('<i class="material-icons mdl-list__item-icon">person</i>');e.append(a);a=c.clone().append(e);b.append(a)});return b},tabs:{add:function(a,c,e,d){a=$(a);var b="";1===d&&(a.parent().find("#tabs-"+c).addClass("is-active"),b="is-active");a.append('<a href="#tabs-'+c+'" class="mdl-tabs__tab '+b+'">'+e+"</a>")}}}}};
|
||||
$(" #checkbox-numbers").is(":checked");a.passwordData.complexity.uppercase=$("#checkbox-uppercase").is(":checked");a.passwordData.complexity.symbols=$("#checkbox-symbols").is(":checked");a.passwordData.complexity.numlength=parseInt($("#passlength").val());b.dialog("close")});componentHandler.upgradeDom()})},close:function(){$(this).dialog("destroy")}})},m=function(b){b.find(".passwordfield__input").each(function(){var b=$(this);if("true"!==b.attr("data-pass-upgraded")){var e=b.parent(),c=b.attr("id"),
|
||||
k=$("#"+c+"R"),d='<button id="menu-speed-'+c+'" class="mdl-button mdl-js-button mdl-button--icon" type="button" title="'+a.config().LANG[27]+'"><i class="material-icons">more_vert</i></button>',d=d+('<ul class="mdl-menu mdl-js-menu" for="menu-speed-'+c+'">')+('<li class="mdl-menu__item passGen"><i class="material-icons">settings</i>'+a.config().LANG[28]+"</li>"),d=d+('<li class="mdl-menu__item passComplexity"><i class="material-icons">vpn_key</i>'+a.config().LANG[29]+"</li>"),d=d+('<li class="mdl-menu__item reset"><i class="material-icons">refresh</i>'+
|
||||
a.config().LANG[30]+"</li>");e.after('<div class="password-actions" />');e.next(".password-actions").prepend('<span class="passLevel passLevel-'+c+' fullround" title="'+a.config().LANG[31]+'"></span>').prepend('<i class="showpass material-icons" title="'+a.config().LANG[32]+'">remove_red_eye</i>').prepend(d);b.on("keyup",function(){a.checkPassLevel(b)});e=b.parent().next();e.find(".passGen").on("click",function(){g(b);b.focus()});e.find(".passComplexity").on("click",function(){h()});e.find(".showpass").on("mouseover",
|
||||
function(){$(this).attr("title",b.val())});e.find(".reset").on("click",function(){b.val("");k.val("");componentHandler.upgradeDom()});b.attr("data-pass-upgraded","true")}});b.find(".passwordfield__input-show").each(function(){var b=$(this),e=b.parent(),b=b.attr("id");e.after('<i class="showpass material-icons" title="'+a.config().LANG[32]+'" data-targetid="'+b+'">remove_red_eye</i>')})},n=function(b){f.info("setupDatePicker");var d={format:"YYYY-MM-DD",lang:a.config().LOCALE.substr(0,2),time:!1,cancelText:a.config().LANG[44],
|
||||
okText:a.config().LANG[43],clearText:a.config().LANG[30],nowText:a.config().LANG[56],minDate:new Date,triggerEvent:"dateIconClick"},e=function(b){f.info(moment.tz("UTC"));f.info(a.config().TIMEZONE);return moment(b).tz(a.config().TIMEZONE).format("X")};b.find(".password-datefield__input").each(function(){var a=$(this);a.bootstrapMaterialDatePicker(d);a.parent().append("<input type='hidden' name='passworddatechange_unix' value='"+e(a.val())+"' />");a.parent().next("i").on("click",function(){a.trigger("dateIconClick")});
|
||||
a.on("change",function(){var b;b=e(a.val());a.parent().find("input[name='passworddatechange_unix']").val(b)})})};d();return{activeTooltip:d,passwordDetect:m,password:g,viewsTriggers:{search:function(){var b=$("#frmSearch"),d=$("#res-content");b.find(".icon-searchfav").on("click",function(){var k=$(this).find("i"),c=b.find("input[name='searchfav']");0==c.val()?(k.addClass("mdl-color-text--amber-A200"),k.attr("title",a.config().LANG[53]),c.val(1)):(k.removeClass("mdl-color-text--amber-A200"),k.attr("title",
|
||||
a.config().LANG[52]),c.val(0));b.submit()});var e=b.find("#tags")[0],c=b.find("i.show-filter");d.on("click","#data-search-header .sort-down,#data-search-header .sort-up",function(){var b=$(this);b.parent().find("a").addClass("filterOn");a.appActions().account.sort(b)}).on("click","#search-rows i.icon-favorite",function(){var b=$(this);a.appActions().account.savefavorite(b,function(){"on"===b.data("status")?(b.addClass("mdl-color-text--amber-A100"),b.attr("title",a.config().LANG[50]),b.html("star")):
|
||||
(b.removeClass("mdl-color-text--amber-A100"),b.attr("title",a.config().LANG[49]),b.html("star_border"))})}).on("click","#search-rows span.tag",function(){0==c.data("state")&&c.trigger("click");e.selectize.addItem($(this).data("tag-id"))});c.on("click",function(){var a=$(this),c=b.find(".search-filters-tags");0==a.data("state")?(c.show("slow"),a.data("state","1"),a.html(a.data("icon-up"))):(c.hide("slow"),a.data("state","0"),a.html(a.data("icon-down")))});0<e.selectedOptions.length&&c.trigger("click")},
|
||||
common:function(a){m(a);n(a)}},loading:{show:function(){$("#wrap-loading").show();$("#loading").addClass("is-active")},hide:function(){$("#wrap-loading").hide();$("#loading").removeClass("is-active")}},ajax:{complete:function(){f.info("ajax:complete");componentHandler.upgradeDom()}},html:{getList:function(a){var b=$('<ul class="ldap-list-item mdl-list"></ul>'),d=$('<li class="mdl-list__item"></li>'),c=$('<span class="mdl-list__item-primary-content"></span>');a.forEach(function(a){var e=c.clone();
|
||||
e.append('<i class="material-icons mdl-list__item-icon">person</i>');e.append(a);a=d.clone().append(e);b.append(a)});return b},tabs:{add:function(a,d,e,c){a=$(a);var b="";1===c&&(a.parent().find("#tabs-"+d).addClass("is-active"),b="is-active");a.append('<a href="#tabs-'+d+'" class="mdl-tabs__tab '+b+'">'+e+"</a>")}}}}};
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
<div id="fancyView" class="msgError">
|
||||
<?php if (count($errors) > 0): ?>
|
||||
<ul class="errors round">
|
||||
<?php foreach ($errors as $err): ?>
|
||||
<?php if (is_array($err)): ?>
|
||||
<li class="err_<?php echo $err["type"]; ?>">
|
||||
<strong><?php echo $err['description']; ?></strong>
|
||||
<?php echo ($err['hint']) ? '<p class="hint">' . $err['hint'] . '</p>' : ''; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php include $this->includeTemplate('error-list', 'main'); ?>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<select name="sitelang" id="sel-sitelang" size="1" class="select-box sel-chosen-ns">
|
||||
<?php foreach ($langsAvailable as $langName => $langValue): ?>
|
||||
<option
|
||||
value='<?php echo $langValue; ?>' <?php echo ($currentLang == $langValue) ? "SELECTED" : ""; ?>><?php echo $langName; ?></option>
|
||||
value='<?php echo $langValue; ?>' <?php echo ($currentLang === $langValue) ? 'SELECTED' : ''; ?>><?php echo $langName; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
44
inc/themes/material-blue/views/main/error-list.inc
Normal file
44
inc/themes/material-blue/views/main/error-list.inc
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $icons \SP\Core\UI\ThemeIconsBase
|
||||
*/
|
||||
?>
|
||||
<?php if (count($errors) > 0): ?>
|
||||
<ul class="errors round">
|
||||
<?php foreach ($errors as $err): ?>
|
||||
<?php if (is_array($err)): ?>
|
||||
<?php if ($err['type'] === \SP\Core\Exceptions\SPException::SP_CRITICAL): ?>
|
||||
<li class="error-critical">
|
||||
<i class="material-icons"><?php echo $icons->getIconCritical()->getIcon(); ?></i>
|
||||
<strong><?php echo $err['description']; ?></strong>
|
||||
<?php if ($err['hint']): ?>
|
||||
<p class="hint">
|
||||
<?php echo $err['hint']; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php elseif ($err['type'] === \SP\Core\Exceptions\SPException::SP_WARNING): ?>
|
||||
<li class="error-warning">
|
||||
<i class="material-icons"><?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<strong><?php echo $err['description']; ?></strong>
|
||||
<?php if ($err['hint']): ?>
|
||||
<p class="hint">
|
||||
<?php echo $err['hint']; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="error-ok">
|
||||
<strong><?php echo $err['description']; ?></strong>
|
||||
<?php if ($err['hint']): ?>
|
||||
<i class="material-icons"><?php echo $icons->getIconInfo()->getIcon(); ?></i>
|
||||
<p class="hint">
|
||||
<?php echo $err['hint']; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
@@ -1,20 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $icons \SP\Core\UI\ThemeIconsBase
|
||||
*/
|
||||
?>
|
||||
<div id="actions" align="center">
|
||||
<?php if (count($errors) > 0): ?>
|
||||
<ul class="errors round">
|
||||
<?php foreach ($errors as $err): ?>
|
||||
<?php if (is_array($err)): ?>
|
||||
<li class="err_<?php echo \SP\Core\Exceptions\SPException::getExceptionTypeName($err["type"]); ?>">
|
||||
<strong><?php echo $err['description']; ?></strong>
|
||||
<?php echo ($err['hint']) ? '<p class="hint">' . $err['hint'] . '</p>' : ''; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php include $this->includeTemplate('error-list'); ?>
|
||||
|
||||
<div class="buttons">
|
||||
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent"
|
||||
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored"
|
||||
onclick="window.location.href='index.php'">
|
||||
<i class="material-icons" title="<?php echo _('Volver'); ?>"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<i class="material-icons"
|
||||
title="<?php echo _('Volver'); ?>"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<?php echo _('Volver'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -6,47 +6,22 @@
|
||||
<main class="mdl-layout__content">
|
||||
<div id="actions" class="installer" align="center">
|
||||
<div id="page-title">
|
||||
<h1><?php echo _('Instalación '), ' ', $appVersion; ?></h1>
|
||||
<h1><?php printf(_('Instalación %s'), $appVersion); ?></h1>
|
||||
</div>
|
||||
|
||||
<?php if (count($errors) > 0): ?>
|
||||
<ul class="errors round">
|
||||
<?php foreach ($errors as $err): ?>
|
||||
<?php if (is_array($err)): ?>
|
||||
<li class="err_<?php echo \SP\Core\Exceptions\SPException::getExceptionTypeName($err['type']); ?>">
|
||||
<strong><?php echo $err['description']; ?></strong>
|
||||
<?php echo (isset($err['hint'])) ? '<p class="hint">' . $err['hint'] . '</p>' : ''; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php include $this->includeTemplate('error-list'); ?>
|
||||
|
||||
<form id="frmInstall" method="post" class="form-action" data-onsubmit="main/install">
|
||||
<input type="hidden" name="install" value="true"/>
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
|
||||
<fieldset id="site">
|
||||
<legend><?php echo _('General'); ?></legend>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="sel-sitelang"><?php echo _('Idioma'); ?></label>
|
||||
<select name="sitelang" id="sel-sitelang" size="1" class="select-box sel-chosen-ns"
|
||||
title="<?php echo _('Idioma'); ?>">
|
||||
<?php foreach ($langsAvailable as $langName => $langValue): ?>
|
||||
<option value='<?php echo $langValue; ?>'><?php echo $langName; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="adminaccount">
|
||||
<legend><?php echo _('Admin de sysPass'); ?></legend>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="adminlogin" name="adminlogin" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="admin" maxlength="80" autocomplete="off"
|
||||
value="admin" maxlength="80" autocomplete="off" tabindex="0"
|
||||
autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="adminlogin"><?php echo _('Usuario administrador de sysPass'); ?></label>
|
||||
@@ -89,7 +64,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset id='databaseField'>
|
||||
<legend><?php echo _('Configurar BBDD') . " (MySQL)"; ?></legend>
|
||||
<legend><?php echo _('Configurar BBDD'), ' (MySQL)'; ?></legend>
|
||||
|
||||
<input type='hidden' id='hasMySQL' value='true'/>
|
||||
<input type="hidden" id="dbtype" name="dbtype" value="mysql"/>
|
||||
@@ -151,23 +126,39 @@
|
||||
<div class="mdl-tooltip" for="help-dbhost">
|
||||
<?php echo _('Nombre del servidor para instalar la base de datos de sysPass'); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="hostingmode">
|
||||
<input type="checkbox" id="hostingmode" class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="hostingmode"/>
|
||||
<span class="mdl-switch__label"><?php echo _('Modo Hosting'); ?>
|
||||
|
||||
<fieldset id="site">
|
||||
<legend><?php echo _('General'); ?></legend>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="sel-sitelang"><?php echo _('Idioma'); ?></label>
|
||||
<select name="sitelang" id="sel-sitelang" size="1" class="select-box" title="<?php echo _('Idioma'); ?>">
|
||||
<?php foreach ($langsAvailable as $langName => $langValue): ?>
|
||||
<option value="<?php echo $langValue; ?>" <?php echo ($langBrowser === $langValue) ? 'selected="selected"' : ''; ?>><?php echo $langName; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="hostingmode">
|
||||
<?php echo _('Modo Hosting'); ?>
|
||||
<div id="help-hostingmode"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
</div>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="mdl-tooltip" for="help-hostingmode">
|
||||
<?php echo _('No crea ni verifica los permisos del usuario sobre la BBDD'); ?>
|
||||
<div class="mdl-tooltip" for="help-hostingmode">
|
||||
<?php echo _('No crea ni verifica los permisos del usuario sobre la BBDD'); ?>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<div>
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="hostingmode">
|
||||
<input type="checkbox" id="hostingmode" class="mdl-checkbox__input" name="hostingmode">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="buttons">
|
||||
|
||||
Reference in New Issue
Block a user