Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2024-02-15 09:40:59 +01:00
commit c6243813bf
3 changed files with 32 additions and 3 deletions

View File

@ -7,8 +7,8 @@
"require": {
"robthree/twofactorauth": "^1.5",
"sabre/dav": "^3.",
"sabre/xml": "^1.4.",
"sabre/dav": "^4.",
"sabre/xml": "*",
"slim/slim": "^3.0",
"erusev/parsedown": "*",
"erusev/parsedown-extra": "*",

View File

@ -59,7 +59,14 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
$class = 'input-medium';
else
$class = 'input-small';
$html .= '<div class="input-group'.($type=='password' ? ' show-hide-password' : '').'">';
$html .= '<input '.($type=='password' ? 'type="password"' : ($type=='number' ? 'type="number"' : ($type=='color' ? 'type="color"' : 'type="text"'))).' class="form-control '.$class.'" name="'.$name.'" value="'.$value.'" placeholder="'.$placeholder.'"/>';
if($this->getTheme() == 'bootstrap4' && $type == 'password') {
$html .= '<div class="input-group-addon">';
$html .= '<a href=""><i class="fa fa-eye-slash" style="position: absolute; right: 15px; top: 10px;" aria-hidden="true"></i></a>';
$html .= '</div>';
}
$html .= '</div>';
}
return $html;
} /* }}} */
@ -161,7 +168,14 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
?>
<tr title="<?= getMLText($title."_desc") ?>">
<td><?= getMLText($title) ?></td>
<td><input name="<?= $name ?>" type="checkbox" <?php if ($settings->{"_".$name}) echo "checked" ?> /></td>
<td>
<?php
if($this->isVisible($name))
echo '<input name="'.$name.'" type="checkbox" '.($settings->{"_".$name} ? "checked" : '').' />';
else
echo getMLText('settings_conf_field_not_editable');
echo "</td>\n";
?>
</tr>
<?php
} /* }}} */

View File

@ -284,6 +284,21 @@ $(document).ready( function() {
$($(this).data("target")+' .modal-header h3').html($(this).data("modal-title"));
});
$('body').on('click', '.show-hide-password a', function(ev){
ev.preventDefault();
// console.log($(this).closest('input'));
// console.log($(ev.target).parent().parent().children('input'));
if($('.show-hide-password input').attr("type") == "text"){
$('.show-hide-password input').attr('type', 'password');
$('.show-hide-password i').addClass( "fa-eye-slash" );
$('.show-hide-password i').removeClass( "fa-eye" );
}else if($('.show-hide-password input').attr("type") == "password"){
$('.show-hide-password input').attr('type', 'text');
$('.show-hide-password i').removeClass( "fa-eye-slash" );
$('.show-hide-password i').addClass( "fa-eye" );
}
});
// $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
initMost();