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

This commit is contained in:
Uwe Steinmann 2025-12-02 21:23:46 +01:00
commit 6422f3c74e
8 changed files with 50 additions and 19 deletions

View File

@ -361,6 +361,7 @@
- add javascript table sorter
- use table sorter on clear cache page and conversion services page
- droping an url in the drag&drop area will download the url
- add button to all password fields to make password visible
--------------------------------------------------------------------------------
Changes in version 5.1.42

View File

@ -160,7 +160,7 @@ elseif ($action == "toggle") { /* {{{ */
if($ret === true)
echo json_encode(array('success'=>true, 'msg'=>getMLText('extension_migration_success')));
else
echo json_encode(array('success'=>true, 'msg'=>getMLText('extension_migration_error')));
echo json_encode(array('success'=>false, 'msg'=>getMLText('extension_migration_error')));
} else {
echo json_encode(array('success'=>true, 'msg'=>getMLText('extension_is_on_now')));
}

View File

@ -1388,7 +1388,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
break;
default:
if(!empty($value['addon']))
echo "<span class=\"input-append\">";
echo '<span class="input-append'.($value["type"]=='password' ? ' show-hide-password' : '').'">';
echo '<input'.
(!empty($value['type']) ? ' type="'.$value['type'].'"' : '').
(!empty($value['id']) ? ' id="'.$value['id'].'"' : '').

View File

@ -100,14 +100,26 @@ $(document).ready( function() {
'id'=>'currentpwd',
'name'=>'currentpwd',
'autocomplete'=>'off',
'required'=>true
'required'=>true,
'addon'=>'<i class="fa fa-eye-slash"></i>'
)
);
if(!$disablechangepassword) {
$this->formField(
getMLText("new_password"),
'<input class="form-control pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30">'
array(
'element'=>'input',
'type'=>'password',
'id'=>'pwd',
'name'=>'pwd',
'class'=>'pwd',
'autocomplete'=>'off',
'required'=>true,
'attributes'=>[['rel', 'strengthbar']],
'addon'=>'<i class="fa fa-eye-slash"></i>'
)
);
if($passwordstrength) {
$this->formField(
getMLText("password_strength"),
@ -122,6 +134,7 @@ $(document).ready( function() {
'id'=>'pwdconf',
'name'=>'pwdconf',
'autocomplete'=>'off',
'addon'=>'<i class="fa fa-eye-slash"></i>'
)
);
}

View File

@ -77,8 +77,8 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
$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 class="input-group-append">';
$html .= '<span class="input-group-text"><i class="fa fa-eye-slash"></i></span>';
$html .= '</div>';
}
$html .= '</div>';

View File

@ -369,6 +369,22 @@ $(document).ready( function() {
$($(this).data("target")+' .modal-header h3').html($(this).data("modal-title"));
}); /* }}} */
$('body').on('click', 'span.show-hide-password span', function(ev) { /* {{{ */
ev.preventDefault();
div = $(this).closest('span.show-hide-password');
icon = $(this).children(":first");
input = div.children(":first");
if (input.attr("type") == "text") {
input.attr('type', 'password');
icon.addClass( "fa-eye-slash" );
icon.removeClass( "fa-eye" );
} else if (input.attr("type") == "password") {
input.attr('type', 'text');
icon.removeClass( "fa-eye-slash" );
icon.addClass( "fa-eye" );
}
}); /* }}} */
$('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
initMost();

View File

@ -1299,12 +1299,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
break;
default:
if(!empty($value['addon']))
echo '<div class="input-group date">';
echo '<div class="input-group date'.($value["type"]=='password' ? ' show-hide-password' : '').'">';
echo '<input'.
(!empty($value['type']) ? ' type="'.$value['type'].'"' : '').
(!empty($value['id']) ? ' id="'.$value['id'].'"' : '').
(!empty($value['name']) ? ' name="'.$value['name'].'"' : '').
(empty($value['class']) ? ' class="form-control"' : ' class="form-control '.$value['class'].'"').
' class="'.(empty($value['class']) ? 'form-control' : 'form-control '.$value['class']).'"'.
((isset($value['value']) && is_string($value['value'])) || !empty($value['value']) ? ' value="'.$value['value'].'"' : '').
(!empty($value['placeholder']) ? ' placeholder="'.$value['placeholder'].'"' : '').
(!empty($value['autocomplete']) ? ' autocomplete="'.$value['autocomplete'].'"' : '').

View File

@ -403,18 +403,19 @@ $(document).ready( function() {
$($(this).data("target")+' .modal-header h3').html($(this).data("modal-title"));
}); /* }}} */
$('body').on('click', '.show-hide-password a', function(ev) { /* {{{ */
$('body').on('click', 'div.show-hide-password span', 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" );
div = $(this).closest('div.show-hide-password');
icon = $(this).children(":first");
input = div.children(":first");
if (input.attr("type") == "text") {
input.attr('type', 'password');
icon.addClass( "fa-eye-slash" );
icon.removeClass( "fa-eye" );
} else if (input.attr("type") == "password") {
input.attr('type', 'text');
icon.removeClass( "fa-eye-slash" );
icon.addClass( "fa-eye" );
}
}); /* }}} */