* [MOD] UI improvements on password view and download actions

This commit is contained in:
nuxsmin
2015-07-18 21:59:44 +02:00
parent 9f00a62a39
commit 6777c7b119
14 changed files with 371 additions and 327 deletions

View File

@@ -167,4 +167,5 @@ if (\SP\Session::getUserIsAdminApp()
echo '<script>checkUpds();</script>';
}
$tpl->addTemplate('js-common');
$controller->view();

View File

@@ -45,4 +45,5 @@ $tpl = new SP\Template();
$tpl->assign('userId', $userId);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getUserPass();
$tpl->addTemplate('js-common');
$controller->view();

View File

@@ -407,47 +407,35 @@
<?php if ($showform): ?>
<script>
$("#selCustomer").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Cliente'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#selCategory").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Categoría'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#selGroups").chosen({
placeholder_text_multiple: "<?php echo _('Seleccionar grupos secundarios'); ?>"
});
$("#selUsers").chosen({
placeholder_text_multiple: "<?php echo _('Seleccionar usuarios'); ?>"
});
$('input:text:visible:first').focus();
$(function(){
$("#selCustomer").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Cliente'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#selCategory").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Categoría'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#selGroups").chosen({
placeholder_text_multiple: "<?php echo _('Seleccionar grupos secundarios'); ?>"
});
$("#selUsers").chosen({
placeholder_text_multiple: "<?php echo _('Seleccionar usuarios'); ?>"
});
$('input:text:visible:first').focus();
$('.checkbox').button().click(
function(){
if ($(this).attr('checked') == undefined){
$(this).button('option', 'label', '<?php echo _('NO'); ?>');
} else {
$(this).button('option', 'label', '<?php echo _('SI'); ?>');
$('.checkbox').button().click(
function(){
if ($(this).attr('checked') == undefined){
$(this).button('option', 'label', '<?php echo _('NO'); ?>');
} else {
$(this).button('option', 'label', '<?php echo _('SI'); ?>');
}
}
}
);
$('#passGen').click(function () {
password(11, true, true);
);
});
$('.showpass').click(function () {
var passInput = $(this).prev();
if (passInput.attr('type') == 'password') {
passInput.get(0).type = 'text';
} else {
passInput.get(0).type = 'password';
}
})
</script>
<?php endif; ?>
@@ -457,22 +445,24 @@
<script>
passToClip = 0;
function clipboard() {
var client = new ZeroClipboard($('.clip-pass-button'), {
swfPath: "js/ZeroClipboard.swf",
debug: false,
title: '<?php echo _('Copiar Clave en Portapapeles'); ?>'
});
$(function(){
function clipboard() {
var client = new ZeroClipboard($('.clip-pass-button'), {
swfPath: "js/ZeroClipboard.swf",
debug: false,
title: '<?php echo _('Copiar Clave en Portapapeles'); ?>'
});
client.on("aftercopy", function (e) {
resMsg("ok", "<?php echo _('Clave Copiada al Portapapeles'); ?>");
});
client.on("aftercopy", function (e) {
resMsg("ok", "<?php echo _('Clave Copiada al Portapapeles'); ?>");
});
client.on("error", function (e) {
ZeroClipboard.destroy();
});
}
client.on("error", function (e) {
ZeroClipboard.destroy();
});
}
clipboard();
clipboard();
});
</script>
<?php endif; ?>

View File

@@ -19,9 +19,15 @@
</td>
<td class="valField">
<?php if (file_exists($backupFile['absolute']) && file_exists($backupDbFile['absolute'])): ?>
<strong><a href="<?php echo $backupDbFile['relative']; ?>" download="<?php echo $backupDbFile['filename']; ?>">Backup BBDD</a></strong>
-
<strong><a href="<?php echo $backupFile['relative']; ?>" download="<?php echo $backupFile['filename']; ?>">Backup <?php echo $siteName; ?></a></strong>
<a href="<?php echo $backupDbFile['relative']; ?>"
download="<?php echo $backupDbFile['filename']; ?>" class="download">
Backup BBDD
</a>
<a href="<?php echo $backupFile['relative']; ?>"
download="<?php echo $backupFile['filename']; ?>" class="download">
Backup <?php echo $siteName; ?>
</a>
<?php else: echo _('No hay backups para descargar'); ?>
<?php endif; ?>
</td>
@@ -42,9 +48,11 @@
OnClick="configMgmt('backup');"/>
</li>
<li>
<img id="help_backup_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg" />
<img id="help_backup_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg"/>
<div id="help_backup" class="help-box" title="<?php echo _('Ayuda'); ?>">
<p class="help-text"><?php echo _('La copia de seguridad permite guardar y descargar tanto la base de datos de sysPass como los archivos de la aplicación y su configuración.'); ?></p>
<p class="help-text"><?php echo _('Con este método es posible guardar todos los datos de sysPass en otro lugar o utilizarlos para hacer la aplicación portable.'); ?></p>
</div>
</li>
@@ -71,7 +79,11 @@
</td>
<td class="valField">
<?php if (file_exists($exportFile['absolute'])): ?>
<strong><a href="<?php echo $exportFile['relative']; ?>" download="<?php echo $exportFile['filename']; ?>">XML <?php echo $siteName; ?></></a></strong>
<a href="<?php echo $exportFile['relative']; ?>"
download="<?php echo $exportFile['filename']; ?>"
class="download">
XML <?php echo $siteName; ?></>
</a>
<?php else: echo _('No hay archivos XML para descargar'); ?>
<?php endif; ?>
</td>
@@ -82,6 +94,8 @@
</td>
<td class="valField">
<input type="password" name="exportPwd" maxlength="255">
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</td>
</tr>
<tr>
@@ -107,11 +121,15 @@
OnClick="configMgmt('export');"/>
</li>
<li>
<img id="help_export_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg" />
<img id="help_export_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg"/>
<div id="help_export" class="help-box" title="<?php echo _('Ayuda'); ?>">
<p class="help-text"><?php echo _('La exportación de cuentas permite guardar las cuentas y sus datos en formato XML para posteriormente poder ser importados en otras instancias de sysPass.'); ?></p>
<p class="help-text"><?php echo _('Los elementos exportados son cuentas, clientes y categorías.'); ?></p>
<p class="help-text"><?php echo _('Las claves de las cuentas son exportadas de forma encriptada para mayor seguridad.'); ?></p>
<p class="help-text"><?php echo _('Es posible establecer una clave de exportación para guardar todos los datos encriptados en el archivo XML.'); ?></p>
</div>
</li>
@@ -119,12 +137,13 @@
</div>
<script>
$(".help-box").dialog({autoOpen: false, title: '<?php echo _('Ayuda'); ?>', minWidth: window.innerWidth / 3 });
$("#help_backup_button").click(function() {
$("#help_backup").dialog("open");
});
$("#help_export_button").click(function() {
$("#help_export").dialog("open");
});
$(function () {
$("#help_backup_button").click(function () {
$("#help_backup").dialog("open");
});
$("#help_export_button").click(function () {
$("#help_export").dialog("open");
});
})
</script>
</div> <!-- End Tab - Backup -->

View File

@@ -12,8 +12,9 @@
<td class="descField"><?php echo _('Idioma'); ?></td>
<td class="valField">
<select name="sitelang" id="sel-sitelang" size="1">
<?php foreach ( $arrLangAvailable as $langName => $langValue ): ?>
<option value='<?php echo $langValue; ?>' <?php echo ( $currentLang == $langValue ) ? "SELECTED" : ""; ?>><?php echo $langName; ?></option>
<?php foreach ($arrLangAvailable as $langName => $langValue): ?>
<option
value='<?php echo $langValue; ?>' <?php echo ($currentLang == $langValue) ? "SELECTED" : ""; ?>><?php echo $langName; ?></option>
<?php endforeach; ?>
</select>
</td>
@@ -23,7 +24,8 @@
<?php echo _('Timeout de sesión (s)'); ?>
</td>
<td class="valField">
<input type="text" name="session_timeout" id="session_timeout" value="<?php echo $sessionTimeout; ?>" maxlength="4" <?php echo $isDisabled; ?> />
<input type="text" name="session_timeout" id="session_timeout"
value="<?php echo $sessionTimeout; ?>" maxlength="4" <?php echo $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -32,8 +34,9 @@
<?php echo SP\Common::printHelpButton("config", 20); ?>
</td>
<td class="valField">
<label for="logenabled"><?php echo ($chkLog) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="log_enabled" id="logenabled" class="checkbox" <?php echo $chkLog,' ',$isDisabled; ?> />
<label for="logenabled"><?php echo ($chkLog) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="log_enabled" id="logenabled"
class="checkbox" <?php echo $chkLog, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -42,8 +45,9 @@
<?php echo SP\Common::printHelpButton("config", 19); ?>
</td>
<td class="valField">
<label for="debug"><?php echo ($chkDebug) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="debug" id="debug" class="checkbox" <?php echo $chkDebug,' ',$isDisabled; ?> />
<label for="debug"><?php echo ($chkDebug) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="debug" id="debug"
class="checkbox" <?php echo $chkDebug, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -52,8 +56,9 @@
<?php echo SP\Common::printHelpButton("config", 18); ?>
</td>
<td class="valField">
<label for="maintenance"><?php echo ($chkMaintenance) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="maintenance" id="maintenance" class="checkbox" <?php echo $chkMaintenance,' ',$isDisabled; ?> />
<label for="maintenance"><?php echo ($chkMaintenance) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="maintenance" id="maintenance"
class="checkbox" <?php echo $chkMaintenance, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -62,8 +67,9 @@
<?php echo SP\Common::printHelpButton("config", 21); ?>
</td>
<td class="valField">
<label for="updates"><?php echo ($chkUpdates) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="updates" id="updates" class="checkbox" <?php echo $chkUpdates,' ',$isDisabled; ?> />
<label for="updates"><?php echo ($chkUpdates) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="updates" id="updates"
class="checkbox" <?php echo $chkUpdates, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -72,8 +78,9 @@
<?php echo SP\Common::printHelpButton("config", 3); ?>
</td>
<td class="valField">
<label for="account_link"><?php echo ($chkAccountLink) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="account_link" id="account_link" class="checkbox" <?php echo $chkAccountLink; ?> />
<label for="account_link"><?php echo ($chkAccountLink) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="account_link" id="account_link"
class="checkbox" <?php echo $chkAccountLink; ?> />
</td>
</tr>
<tr>
@@ -82,8 +89,9 @@
<?php echo SP\Common::printHelpButton("config", 5); ?>
</td>
<td class="valField">
<label for="filesenabled"><?php echo ($chkFiles) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="files_enabled" id="filesenabled" class="checkbox" <?php echo $chkFiles,' ',$isDisabled; ?> />
<label for="filesenabled"><?php echo ($chkFiles) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="files_enabled" id="filesenabled"
class="checkbox" <?php echo $chkFiles, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -92,8 +100,9 @@
<?php echo SP\Common::printHelpButton("config", 24); ?>
</td>
<td class="valField">
<label for="globalsearch"><?php echo ($chkGlobalSearch) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="globalsearch" id="globalsearch" class="checkbox" <?php echo $chkGlobalSearch,' ',$isDisabled; ?> />
<label for="globalsearch"><?php echo ($chkGlobalSearch) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="globalsearch" id="globalsearch"
class="checkbox" <?php echo $chkGlobalSearch, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -102,7 +111,8 @@
<?php echo SP\Common::printHelpButton("config", 22); ?>
</td>
<td class="valField">
<input type="text" name="files_allowed_exts" id="allowed_exts" value="<?php echo $filesAllowedExts; ?>"/>
<input type="text" name="files_allowed_exts" id="allowed_exts"
value="<?php echo $filesAllowedExts; ?>"/>
</td>
</tr>
<tr>
@@ -111,7 +121,8 @@
<?php echo SP\Common::printHelpButton("config", 6); ?>
</td>
<td class="valField">
<input type="text" name="files_allowed_size" id="files_allowed_size" value="<?php echo $filesAllowedSize; ?>" maxlength="5" <?php echo $isDisabled; ?> />
<input type="text" name="files_allowed_size" id="files_allowed_size"
value="<?php echo $filesAllowedSize; ?>" maxlength="5" <?php echo $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -120,7 +131,8 @@
<?php echo SP\Common::printHelpButton("config", 4); ?>
</td>
<td class="valField">
<input type="text" name="account_count" id="sel-account_count" value="<?php echo $accountCount; ?>" maxlength="5" <?php echo $isDisabled; ?> />
<input type="text" name="account_count" id="sel-account_count" value="<?php echo $accountCount; ?>"
maxlength="5" <?php echo $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -129,8 +141,9 @@
<?php echo SP\Common::printHelpButton("config", 25); ?>
</td>
<td class="valField">
<label for="resultsascards"><?php echo ($chkResultsAsCards) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="resultsascards" id="resultsascards" class="checkbox" <?php echo $chkResultsAsCards,' ',$isDisabled; ?> />
<label for="resultsascards"><?php echo ($chkResultsAsCards) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="resultsascards" id="resultsascards"
class="checkbox" <?php echo $chkResultsAsCards, ' ', $isDisabled; ?> />
</td>
</tr>
</table>
@@ -147,8 +160,9 @@
<?php echo SP\Common::printHelpButton("config", 7); ?>
</td>
<td class="valField">
<label for="wikienabled"><?php echo ($chkWiki) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="wiki_enabled" id="wikienabled" class="checkbox" <?php echo $chkWiki,' ',$isDisabled; ?> />
<label for="wikienabled"><?php echo ($chkWiki) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="wiki_enabled" id="wikienabled"
class="checkbox" <?php echo $chkWiki, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -157,7 +171,8 @@
<?php echo SP\Common::printHelpButton("config", 8); ?>
</td>
<td class="valField">
<input type="text" name="wiki_searchurl" class="txtLong" value="<?php echo $wikiSearchUrl; ?>" maxlength="128" />
<input type="text" name="wiki_searchurl" class="txtLong" value="<?php echo $wikiSearchUrl; ?>"
maxlength="128"/>
</td>
</tr>
<tr>
@@ -166,7 +181,8 @@
<?php echo SP\Common::printHelpButton("config", 9); ?>
</td>
<td class="valField">
<input type="text" name="wiki_pageurl" class="txtLong" value="<?php echo $wikiPageUrl; ?>" maxlength="128" />
<input type="text" name="wiki_pageurl" class="txtLong" value="<?php echo $wikiPageUrl; ?>"
maxlength="128"/>
</td>
</tr>
<tr>
@@ -175,7 +191,7 @@
<?php echo SP\Common::printHelpButton("config", 10); ?>
</td>
<td class="valField">
<input type="text" name="wiki_filter" id="wikifilter" value="<?php echo $wikiFilter; ?>" />
<input type="text" name="wiki_filter" id="wikifilter" value="<?php echo $wikiFilter; ?>"/>
</td>
</tr>
</table>
@@ -187,15 +203,16 @@
</div>
<table id="tblLdap" class="data tblConfig round">
<?php if ( $ldapIsAvailable || $isDemoMode ): ?>
<?php if ($ldapIsAvailable || $isDemoMode): ?>
<tr>
<td class="descField">
<?php echo _('Habilitar LDAP'); ?>
<?php echo SP\Common::printHelpButton("config", 11); ?>
</td>
<td class="valField">
<label for="ldapenabled"><?php echo ($chkLdap) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="ldap_enabled" id="ldapenabled" class="checkbox" <?php echo $chkLdap,' ',$isDisabled; ?> />
<label for="ldapenabled"><?php echo ($chkLdap) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="ldap_enabled" id="ldapenabled"
class="checkbox" <?php echo $chkLdap, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -204,7 +221,8 @@
<?php echo SP\Common::printHelpButton("config", 15); ?>
</td>
<td class="valField">
<input type="text" name="ldap_server" value="<?php echo $ldapServer; ?>" maxlength="128" <?php echo $isDisabled; ?>/>
<input type="text" name="ldap_server" value="<?php echo $ldapServer; ?>"
maxlength="128" <?php echo $isDisabled; ?>/>
</td>
</tr>
<tr>
@@ -213,7 +231,8 @@
<?php echo SP\Common::printHelpButton("config", 12); ?>
</td>
<td class="valField">
<input type="text" name="ldap_binduser" value="<?php echo $ldapBindUser; ?>" maxlength="128" <?php echo $isDisabled; ?>/>
<input type="text" name="ldap_binduser" value="<?php echo $ldapBindUser; ?>"
maxlength="128" <?php echo $isDisabled; ?>/>
</td>
</tr>
<tr>
@@ -222,7 +241,10 @@
<?php echo SP\Common::printHelpButton("config", 17); ?>
</td>
<td class="valField">
<input type="password" name="ldap_bindpass" value="<?php echo $ldapBindPass; ?>" maxlength="128" <?php echo $isDisabled; ?>/>
<input type="password" name="ldap_bindpass" value="<?php echo $ldapBindPass; ?>"
maxlength="128" <?php echo $isDisabled; ?>/>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</td>
</tr>
<tr>
@@ -231,7 +253,8 @@
<?php echo SP\Common::printHelpButton("config", 13); ?>
</td>
<td class="valField">
<input type="text" name="ldap_base" class="txtLong" value="<?php echo $ldapBase; ?>" maxlength="128" <?php echo $isDisabled; ?>/>
<input type="text" name="ldap_base" class="txtLong" value="<?php echo $ldapBase; ?>"
maxlength="128" <?php echo $isDisabled; ?>/>
</td>
</tr>
<tr>
@@ -240,7 +263,8 @@
<?php echo SP\Common::printHelpButton("config", 14); ?>
</td>
<td class="valField">
<input type="text" name="ldap_group" class="txtLong" value="<?php echo $ldapGroup; ?>" maxlength="128" <?php echo $isDisabled; ?>/>
<input type="text" name="ldap_group" class="txtLong" value="<?php echo $ldapGroup; ?>"
maxlength="128" <?php echo $isDisabled; ?>/>
</td>
</tr>
<tr>
@@ -249,10 +273,12 @@
<?php echo SP\Common::printHelpButton("config", 27); ?>
</td>
<td class="valField">
<select id="ldap_defaultgroup" name="ldap_defaultgroup" class="select-box" <?php echo $isDisabled; ?> required>
<select id="ldap_defaultgroup" name="ldap_defaultgroup"
class="select-box" <?php echo $isDisabled; ?> required>
<option value="0"></option>
<?php foreach ($groups as $id => $name): ?>
<option value="<?php echo $id; ?>" <?php echo ($id === $ldapDefaultGroup) ? 'selected' : ''; ?>><?php echo $name; ?></option>
<option
value="<?php echo $id; ?>" <?php echo ($id === $ldapDefaultGroup) ? 'selected' : ''; ?>><?php echo $name; ?></option>
<?php endforeach; ?>
</select>
</td>
@@ -263,10 +289,12 @@
<?php echo SP\Common::printHelpButton("config", 28); ?>
</td>
<td class="valField">
<select id="ldap_defaultprofile" name="ldap_defaultprofile" class="select-box" <?php echo $isDisabled; ?> required>
<select id="ldap_defaultprofile" name="ldap_defaultprofile"
class="select-box" <?php echo $isDisabled; ?> required>
<option value="0"></option>
<?php foreach ($profiles as $id => $name): ?>
<option value="<?php echo $id; ?>" <?php echo ($id === $ldapDefaultProfile) ? 'selected' : ''; ?>><?php echo $name; ?></option>
<option
value="<?php echo $id; ?>" <?php echo ($id === $ldapDefaultProfile) ? 'selected' : ''; ?>><?php echo $name; ?></option>
<?php endforeach; ?>
</select>
</td>
@@ -277,8 +305,9 @@
<?php echo SP\Common::printHelpButton("config", 26); ?>
</td>
<td class="valField">
<label for="ldap_ads"><?php echo ($chkLdapADS) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="ldap_ads" id="ldap_ads" class="checkbox" <?php echo $chkLdapADS,' ',$isDisabled; ?> />
<label for="ldap_ads"><?php echo ($chkLdapADS) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="ldap_ads" id="ldap_ads"
class="checkbox" <?php echo $chkLdapADS, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -286,7 +315,8 @@
<?php echo _('Comprobar'); ?>
</td>
<td class="valField">
<img src="imgs/refresh.png" class="inputImg" title="<?php echo _('Comprobar conexión con LDAP'); ?>" onclick="checkLdapConn();"/>
<img src="imgs/refresh.png" class="inputImg"
title="<?php echo _('Comprobar conexión con LDAP'); ?>" onclick="checkLdapConn();"/>
</td>
</tr>
<?php else: ?>
@@ -309,8 +339,9 @@
<?php echo _('Habilitar notificaciones de correo'); ?>
</td>
<td class="valField">
<label for="mailenabled"><?php echo ($chkMail) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="mail_enabled" id="mailenabled" class="checkbox" <?php echo $chkMail,' ',$isDisabled; ?> />
<label for="mailenabled"><?php echo ($chkMail) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="mail_enabled" id="mailenabled"
class="checkbox" <?php echo $chkMail, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -318,7 +349,7 @@
<?php echo _('Servidor'); ?>
</td>
<td class="valField">
<input type="text" name="mail_server" size="20" value="<?php echo $mailServer; ?>" maxlength="128" />
<input type="text" name="mail_server" size="20" value="<?php echo $mailServer; ?>" maxlength="128"/>
</td>
</tr>
<tr>
@@ -326,7 +357,7 @@
<?php echo _('Puerto'); ?>
</td>
<td class="valField">
<input type="text" name="mail_port" size="20" value="<?php echo $mailPort; ?>" maxlength="5" />
<input type="text" name="mail_port" size="20" value="<?php echo $mailPort; ?>" maxlength="5"/>
</td>
</tr>
<tr>
@@ -334,8 +365,9 @@
<?php echo _('Habilitar Autentificación'); ?>
</td>
<td class="valField">
<label for="mailauthenabled"><?php echo ($chkMailAuth) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="mail_authenabled" id="mailauthenabled" class="checkbox" <?php echo $chkMailAuth,' ',$isDisabled; ?> />
<label for="mailauthenabled"><?php echo ($chkMailAuth) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="mail_authenabled" id="mailauthenabled"
class="checkbox" <?php echo $chkMailAuth, ' ', $isDisabled; ?> />
</td>
</tr>
<tr>
@@ -343,7 +375,7 @@
<?php echo _('Usuario'); ?>
</td>
<td class="valField">
<input type="text" name="mail_user" size="20" value="<?php echo $mailUser; ?>" maxlength="50" />
<input type="text" name="mail_user" size="20" value="<?php echo $mailUser; ?>" maxlength="50"/>
</td>
</tr>
<tr>
@@ -351,7 +383,9 @@
<?php echo _('Clave'); ?>
</td>
<td class="valField">
<input type="password" name="mail_pass" size="20" value="<?php echo $mailPass; ?>" maxlength="50" />
<input type="password" name="mail_pass" size="20" value="<?php echo $mailPass; ?>" maxlength="50"/>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</td>
</tr>
<tr>
@@ -361,9 +395,9 @@
<td class="valField">
<select name="mail_security" id="sel-mailsecurity" size="1">
<?php echo '<option>'._('Deshabilitada').'</option>'; ?>
<?php foreach ( $mailSecurity as $security ): ?>
<?php echo "<option ",($currentMailSecurity == $security ) ? "SELECTED" : "", ">$security</option>"; ?>
<?php echo '<option>' . _('Deshabilitada') . '</option>'; ?>
<?php foreach ($mailSecurity as $security): ?>
<?php echo "<option ", ($currentMailSecurity == $security) ? "SELECTED" : "", ">$security</option>"; ?>
<?php endforeach; ?>
</select>
</td>
@@ -373,7 +407,7 @@
<?php echo _('Dirección de correo de envío'); ?>
</td>
<td class="valField">
<input type="text" name="mail_from" size="20" value="<?php echo $mailFrom; ?>" maxlength="128" />
<input type="text" name="mail_from" size="20" value="<?php echo $mailFrom; ?>" maxlength="128"/>
</td>
</tr>
<tr>
@@ -381,108 +415,103 @@
<?php echo _('Habilitar peticiones por correo'); ?>
</td>
<td class="valField">
<label for="mailrequestsenabled"><?php echo ($chkMailRequests) ? 'ON' : 'OFF'; ?></label>
<input type="checkbox" name="mail_requestsenabled" id="mailrequestsenabled" class="checkbox" <?php echo $chkMailRequests,' ',$isDisabled; ?> />
<label for="mailrequestsenabled"><?php echo ($chkMailRequests) ? 'SI' : 'NO'; ?></label>
<input type="checkbox" name="mail_requestsenabled" id="mailrequestsenabled"
class="checkbox" <?php echo $chkMailRequests, ' ', $isDisabled; ?> />
</td>
</tr>
</table>
<?php if ( $isDemoMode ): ?>
<input type="hidden" name="log_enabled" value="1" />
<input type="hidden" name="files_enabled" value="1" />
<input type="hidden" name="wiki_enabled" value="1" />
<?php if ($isDemoMode): ?>
<input type="hidden" name="log_enabled" value="1"/>
<input type="hidden" name="files_enabled" value="1"/>
<input type="hidden" name="wiki_enabled" value="1"/>
<?php endif; ?>
<input type="hidden" name="activeTab" value="<?php echo $config_tabIndex; ?>" />
<input type="hidden" name="actionId" value="<?php echo \SP\Controller\ActionsInterface::ACTION_CFG_GENERAL; ?>" />
<input type="hidden" name="isAjax" value="1" />
<input type="hidden" name="activeTab" value="<?php echo $config_tabIndex; ?>"/>
<input type="hidden" name="actionId"
value="<?php echo \SP\Controller\ActionsInterface::ACTION_CFG_GENERAL; ?>"/>
<input type="hidden" name="isAjax" value="1"/>
<input type="hidden" name="sk" value="<?php echo $sk; ?>">
</form>
<div class="action">
<ul>
<li
><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="configMgmt('saveconfig');" />
><img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg"
OnClick="configMgmt('saveconfig');"/>
</li>
</ul>
</div>
</div> <!-- End Tab - Config -->
<script>
$("#sel-sitelang,#sel-account_link,#sel-mailsecurity").chosen({disable_search : true});
$(function () {
$("#sel-sitelang,#sel-account_link,#sel-mailsecurity").chosen({disable_search: true});
$('#frmConfig').find('.checkbox').button().click(
function(){
if ($(this).attr('checked') == undefined){
$(this).button('option', 'label', 'OFF');
} else {
$(this).button('option', 'label', 'ON');
$('#allowed_exts').tagsInput({
'width': '350px',
'defaultText': '<?php echo _('Añadir extensión'); ?>',
'defaultRemoveText': '<?php echo _('Eliminar extensión'); ?>',
'removeWithBackspace': false,
'tagsToUpper': true,
'maxChars': 4,
'onAddTag': function () {
// Fix scrolling to bottom
var $tagsbox = $(this).next();
$tagsbox.animate({scrollTop: $tagsbox.height()});
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '" />');
}
},
'onRemoveTag': function () {
var $tagsbox = $(this).next();
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '"/>');
}
}
}
);
});
$('#wikifilter').tagsInput({
'width': '350px',
'height': '50px',
'defaultText': '<?php echo _('Añadir filtro'); ?>',
'defaultRemoveText': '<?php echo _('Eliminar filtro'); ?>',
'removeWithBackspace': false,
onAddTag: function () {
// Fix scrolling to bottom
var $tagsbox = $(this).next();
$tagsbox.animate({scrollTop: $tagsbox.height()});
$('#allowed_exts').tagsInput({
'width':'350px',
'defaultText':'<?php echo _('Añadir extensión'); ?>',
'defaultRemoveText':'<?php echo _('Eliminar extensión'); ?>',
'removeWithBackspace' : false,
'tagsToUpper' : true,
'maxChars' : 4,
'onAddTag' : function(){
// Fix scrolling to bottom
var $tagsbox = $(this).next();
$tagsbox.animate({scrollTop: $tagsbox.height()});
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '"/>');
}
},
onRemoveTag: function () {
var $tagsbox = $(this).next();
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '" />');
if ($tagsbox.find('img:last').attr('alt') != 'warning') {
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '"/>');
}
},
onChange: function () {
var $tagsbox = $(this).next();
var last_width = $tagsbox.find("span:last").width() + 10;
$tagsbox.find(".tag:last").css('width', last_width);
}
},
'onRemoveTag' : function(){
var $tagsbox = $(this).next();
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '"/>');
}
}
});
$('#wikifilter').tagsInput({
'width':'350px',
'height':'50px',
'defaultText':'<?php echo _('Añadir filtro'); ?>',
'defaultRemoveText':'<?php echo _('Eliminar filtro'); ?>',
'removeWithBackspace' : false,
onAddTag : function(){
// Fix scrolling to bottom
var $tagsbox = $(this).next();
$tagsbox.animate({scrollTop: $tagsbox.height()});
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '"/>');
}
},
onRemoveTag : function(){
var $tagsbox = $(this).next();
if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){
$tagsbox.find('div:last').prev().append('<img src="imgs/warning.png" alt="warning" class="iconMini" title="' + LANG[5] + '"/>');
}
},
onChange : function(){
var $tagsbox = $(this).next();
var last_width = $tagsbox.find("span:last").width() + 10;
$tagsbox.find(".tag:last").css('width', last_width);
}
});
$("#ldap_defaultgroup").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Grupo'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#ldap_defaultprofile").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Perfil'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#session_timeout").spinner({step: 300, min: 300, numberFormat: "n"});
$("#files_allowed_size").spinner({step: 1024, min: 1024, numberFormat: "n"});
$("#sel-account_count").spinner({step: 6, max: 100, min: 6, numberFormat: "n"});
});
$("#ldap_defaultgroup").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Grupo'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#ldap_defaultprofile").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Perfil'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#session_timeout").spinner({step: 300, min: 300, numberFormat: "n"});
$("#files_allowed_size").spinner({step: 1024, min: 1024, numberFormat: "n"});
$("#sel-account_count").spinner({step: 6, max: 100, min: 6, numberFormat: "n"});
})
</script>

View File

@@ -59,17 +59,7 @@ echo $title['class']; ?>"><?php echo $title['name']; ?></div>
</ul>
</div>
<script>
$('input:password:visible:first').focus();
$('#passGen').click(function () {
password(11, true, true);
$(function(){
$('input:password:visible:first').focus();
});
$('.showpass').click(function () {
var passInput = $(this).prev();
if (passInput.attr('type') == 'password') {
passInput.get(0).type = 'text';
} else {
passInput.get(0).type = 'password';
}
})
</script>

View File

@@ -2,7 +2,7 @@
<div id="tabs-<?php use SP\Acl;
use SP\Common;
echo $encryption_tabIndex;?>">
echo $encryption_tabIndex; ?>">
<div id="title" class="midroundup titleNormal">
<?php echo _('Clave Maestra'); ?>
@@ -26,6 +26,8 @@ echo $encryption_tabIndex;?>">
</td>
<td class="valField">
<input type="password" name="curMasterPwd" maxlength="255">
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</td>
</tr>
<tr>
@@ -34,6 +36,8 @@ echo $encryption_tabIndex;?>">
</td>
<td class="valField">
<input type="password" name="newMasterPwd" maxlength="255" OnKeyUp="checkPassLevel(this.value)">
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<span class="passLevel fullround" title="<?php echo _('Nivel de fortaleza de la clave'); ?>"></span>
</td>
</tr>
@@ -76,7 +80,8 @@ echo $encryption_tabIndex;?>">
</tr>
</table>
<input type="hidden" name="activeTab" value="<?php echo $encryption_tabIndex; ?>"/>
<input type="hidden" name="actionId" value="<?php echo \SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION; ?>"/>
<input type="hidden" name="actionId"
value="<?php echo \SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION; ?>"/>
<input type="hidden" name="isAjax" value="1"/>
<input type="hidden" name="sk" value="<?php echo $sk; ?>">
</form>
@@ -87,9 +92,11 @@ echo $encryption_tabIndex;?>">
OnClick="configMgmt('savempwd');"/>
</li>
<li>
<img id="help_mpass_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg" />
<img id="help_mpass_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg"/>
<div id="help_mpass" class="help-box" title="<?php echo _('Ayuda'); ?>">
<p class="help-text"><?php echo _('La clave maestra es utilizada para encriptar las claves de las cuentas de sysPass para mantenerlas seguras.'); ?></p>
<p class="help-text"><?php echo _('Es recomendable cambiarla cada cierto tiempo y utilizar una clave compleja que incluya números, letras y símbolos.'); ?></p>
</div>
</li>
@@ -116,7 +123,7 @@ echo $encryption_tabIndex;?>">
</td>
<td class="valField">
<?php if (time() > $tempMasterMaxTime): ?>
<span style="color: red"><?php echo date("r", $tempMasterMaxTime); ?></span>
<span style="color: red"><?php echo date("r", $tempMasterMaxTime); ?></span>
<?php elseif ($tempMasterMaxTime > 0): echo date("r", $tempMasterMaxTime); ?>
<?php else: echo _('No generada'); ?>
<?php endif; ?>
@@ -133,7 +140,8 @@ echo $encryption_tabIndex;?>">
</tr>
</table>
<input type="hidden" name="activeTab" value="<?php echo $encryption_tabIndex; ?>"/>
<input type="hidden" name="actionId" value="<?php echo \SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION_TEMPPASS; ?>"/>
<input type="hidden" name="actionId"
value="<?php echo \SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION_TEMPPASS; ?>"/>
<input type="hidden" name="isAjax" value="1"/>
<input type="hidden" name="sk" value="<?php echo $sk; ?>">
</form>
@@ -144,7 +152,8 @@ echo $encryption_tabIndex;?>">
OnClick="configMgmt('gentmpass');"/>
</li>
<li>
<img id="help_tmpass_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg" />
<img id="help_tmpass_button" src="imgs/help.png" title="<?php echo _('Ayuda'); ?>" class="inputImg"/>
<div id="help_tmpass" class="help-box" title="<?php echo _('Ayuda'); ?>">
<p class="help-text"><?php echo _('La clave temporal es utilizada como clave maestra para los usuarios que necesitan introducirla al iniciar la sesión, así no es necesario facilitar la clave maestra original.'); ?></p>
</div>
@@ -154,26 +163,17 @@ echo $encryption_tabIndex;?>">
</div> <!-- End Tab - Encryption -->
<script>
$('#frmCrypt .checkbox').button();
$('#frmCrypt .ui-button').click(function () {
// El cambio de clase se produce durante el evento de click
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
if ($(this).hasClass('ui-state-active')) {
$(this).children().html('<?php echo _('NO'); ?>');
} else {
$(this).children().html('<?php echo _('SI'); ?>');
}
});
$("#tmpass_maxtime").spinner({
step: 60, min: 60, numberFormat: "n", stop: function (event, ui) {
accSearch(0);
}
});
$(".help-box").dialog({autoOpen: false, title: '<?php echo _('Ayuda'); ?>'});
$("#help_tmpass_button").click(function() {
$("#help_tmpass").dialog("open");
});
$("#help_mpass_button").click(function() {
$("#help_mpass").dialog("open");
$(function () {
$("#tmpass_maxtime").spinner({
step: 60, min: 60, numberFormat: "n", stop: function (event, ui) {
accSearch(0);
}
});
$("#help_tmpass_button").click(function () {
$("#help_tmpass").dialog("open");
});
$("#help_mpass_button").click(function () {
$("#help_mpass").dialog("open");
});
});
</script>

View File

@@ -78,7 +78,7 @@
</div>
<div id="pageNav" class="round shadow">
<div id="pageNavLeft">
<? echo $totalRows; ?> @ <?php echo round(microtime() - $queryTimeStart, 5); ?>s
<?php echo $totalRows; ?> @ <?php echo round(microtime() - $queryTimeStart, 5); ?>s
</div>
<div id="pageNavRight">
<?php if ($limitStart > 1): ?>

View File

@@ -24,6 +24,8 @@ echo $import_tabIndex; ?>">
</td>
<td class="valField">
<input type="password" name="dbpass" value=""/>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</td>
</tr>
<tr>
@@ -118,6 +120,8 @@ echo $import_tabIndex; ?>">
</td>
<td class="valField">
<input type="password" name="importPwd" maxlength="255">
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</td>
</tr>
</form>
@@ -162,28 +166,20 @@ echo $import_tabIndex; ?>">
</div> <!-- End Tab - Import -->
<script>
$('#frmMigrate .checkbox').button();
$('#frmMigrate .ui-button').click(function () {
// El cambio de clase se produce durante el evento de click
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
if ($(this).hasClass('ui-state-active')) {
$(this).children().html('<?php echo _('NO'); ?>');
} else {
$(this).children().html('<?php echo _('SI'); ?>');
}
});
importFile('<?php echo Common::getSessionKey(true); ?>');
$("#import_defaultgroup").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Grupo'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#import_defaultuser").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Usuario'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#help_import_button").click(function () {
$("#help_import").dialog("open");
$(function () {
importFile('<?php echo Common::getSessionKey(true); ?>');
$("#import_defaultgroup").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Grupo'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#import_defaultuser").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Usuario'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#help_import_button").click(function () {
$("#help_import").dialog("open");
});
});
</script>

View File

@@ -24,22 +24,22 @@
<fieldset id="adminaccount">
<legend><?php echo _('Crear cuenta de admin de sysPass'); ?></legend>
<p>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Login del usuario administrador de sysPass'); ?>"/>
<input type="text" name="adminlogin" id="adminlogin" title="<?php echo _('Usuario'); ?>"
placeholder="<?php echo _('Usuario'); ?>"
value="<?php echo $adminlogin; ?>" autocomplete="off" autofocus
required/>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Login del usuario administrador de sysPass'); ?>"/>
</p>
<p>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<input type="password" name="adminpass" id="adminpass"
title="<?php echo _('Clave'); ?>"
placeholder="<?php echo _('Clave'); ?>"
value="<?php echo $adminpass; ?>" autocomplete="off"
onKeyUp="checkPassLevel(this.value,'adminaccount')" required/>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<span class="passLevel passLevel-float fullround"
title="<?php echo _('Nivel de fortaleza de la clave'); ?>"></span>
</p>
@@ -48,13 +48,13 @@
<fieldset id="masterpwd">
<legend><?php echo _('Clave Maestra'); ?></legend>
<p>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<input type="password" name="masterpassword" id="masterpassword"
title="<?php echo _('Clave Maestra'); ?> "
placeholder="<?php echo _('Clave Maestra'); ?>"
value="<?php echo $masterpassword; ?>" autocomplete="off"
onKeyUp="checkPassLevel(this.value,'masterpwd')" required/>
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<span class="passLevel passLevel-float fullround"
title="<?php echo _('Nivel de fortaleza de la clave'); ?>"></span>
</p>
@@ -66,76 +66,53 @@
<input type="hidden" id="dbtype" name="dbtype" value="mysql"/>
<p>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Login de usuario con permisos de administrador de MySQL'); ?>"/>
<input type="text" name="dbuser" id="dbuser" title="<?php echo _('Usuario BBDD'); ?>"
placeholder="<?php echo _('Usuario BBDD'); ?>"
value="<?php echo $dbuser; ?>" autocomplete=off" required/>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Login de usuario con permisos de administrador de MySQL'); ?>"/>
</p>
<p>
<img class="showpass inputImg " src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<input type="password" name="dbpass" id="dbpass" title="<?php echo _('Clave BBDD'); ?>"
placeholder="<?php echo _('Clave BBDD'); ?>"
value="<?php echo $dbpass; ?>" required/>
<img class="showpass inputImg " src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
</p>
<p>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Nombre de la base de datos para sysPass'); ?>"/>
<input type="text" name="dbname" id="dbname" title="<?php echo _('Nombre BBDD'); ?>"
placeholder="<?php echo _('Nombre BBDD'); ?>"
value="<?php echo $dbname; ?>" autocomplete=off"
pattern="[0-9a-zA-Z$_-]+" required/>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Nombre de la base de datos para sysPass'); ?>"/>
</p>
<p>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Nombre del servidor de la base de datos de sysPass'); ?>"/>
<input type="text" name="dbhost" id="dbhost" title="<?php echo _('Servidor BBDD'); ?>"
placeholder="<?php echo _('Servidor BBDD'); ?>"
value="<?php echo $dbhost; ?>" required/>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('Nombre del servidor de la base de datos de sysPass'); ?>"/>
</p>
<br>
<p>
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('No crea ni verifica los permisos del usuario sobre la BBDD'); ?>"/>
<span class="option-text"><?php echo _('Modo Hosting'); ?></span>
<label
for="hostingmode"><?php echo ($hostingmode) ? _('Modo Hosting') . ' ON' : _('Modo Hosting') . ' OFF'; ?></label>
for="hostingmode"><?php echo ($hostingmode) ? _('NO') : _('SI'); ?></label>
<input type="checkbox" name="hostingmode"
id="hostingmode"
class="checkbox" <?php echo ($hostingmode) ? 'checked' : ''; ?> />
<img src="imgs/help.png" class="inputImg"
title="<?php echo _('No crea ni verifica los permisos del usuario sobre la BBDD'); ?>"/>
</p>
</fieldset>
<div class="buttons"><input type="submit" class="button" value="<?php echo _('Instalar'); ?>"/></div>
</form>
<?php endif; ?>
</div>
<script>
var hostingmode = <?php echo ($hostingmode === true) ? 1 : 0; ?>;
$('#frmInstall').find('.checkbox').button();
$('#frmInstall').find('.ui-button').click(function () {
if (hostingmode == 1) {
hostingmode = 0;
$(this).children().html('<?php echo _('Modo Hosting');?> OFF');
} else {
hostingmode = 1;
$(this).children().html('<?php echo _('Modo Hosting');?> ON');
}
});
$('.showpass').click(function () {
var passInput = $(this).next();
if (passInput.attr('type') == 'password') {
passInput.get(0).type = 'text';
} else {
passInput.get(0).type = 'password';
}
})
</script>
</div>

42
inc/tpl/js-common.inc Normal file
View File

@@ -0,0 +1,42 @@
<script>
$(function () {
$(".showpass").each(function (index, input) {
// Cross-browser compatibility
$(this).on("mouseover", function () {
$(this).data('powertip', function(){
return $(this).prev().val()
});
});
});
$( ".download" ).button({
icons: { primary: " ui-icon-arrowthickstop-1-s"}
});
$( ".checkbox" ).button({
icons: { primary: "ui-icon-transferthick-e-w"}
});
$('.checkbox').button().click(
function () {
// var curValue = $(this).button('option', 'label');
//
// if(curValue != ''){
// curValue += ' ';
// }
if ($(this).attr('checked') == undefined) {
$(this).button('option', 'label', '<?php echo _('NO'); ?>');
} else {
$(this).button('option', 'label', '<?php echo _('SI'); ?>');
}
}
);
$(".help-box").dialog({autoOpen: false, title: '<?php echo _('Ayuda'); ?>'});
$('#passGen').click(function () {
password(11, true, true);
});
});
</script>

View File

@@ -168,19 +168,21 @@
<?php endif; ?>
</div>
<script>
$("#btnUserOptions").buttonset();
$("#selProfile").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Perfil'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#selGroup").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Grupo'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$('#passGen').click(function () {
$('#resFancyAccion').hide();
password(11, true, true);
$(function() {
$("#btnUserOptions").buttonset();
$("#selProfile").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Perfil'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$("#selGroup").chosen({
placeholder_text_single: "<?php echo _('Seleccionar Grupo'); ?>",
disable_search_threshold: 10,
no_results_text: "<?php echo _('Sin resultados'); ?>"
});
$('#passGen').click(function () {
$('#resFancyAccion').hide();
password(11, true, true);
});
});
</script>

View File

@@ -8,6 +8,8 @@
</td>
<td class="valField">
<input type="password" id="usrpass" name="pass" title="<?php echo _('Clave'); ?>" class="txtpass" OnFocus="$('#passLevel').show(); $('#resFancyAccion').hide();" OnKeyUp="checkPassLevel(this.value, 'fancyContainer')" />
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
alt="<?php echo _('Mostrar Clave'); ?>"/>
<img id="passGen" src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria'); ?>" class="inputImg" />
</td>
</tr>
@@ -35,10 +37,4 @@
</li>
</ul>
</div>
</div>
<script>
$('#passGen').click(function(){
$('#resFancyAccion').hide();
password(11, true, false, 'fancyContainer');
});
</script>
</div>

View File

@@ -171,6 +171,7 @@ class MainC extends Controller implements ActionsInterface
public function getInstaller()
{
$this->view->addTemplate('install');
$this->view->addTemplate('js-common');
$this->view->addTemplate('footer');
$this->view->assign('modulesErrors', Util::checkModules());