diff --git a/CHANGELOG b/CHANGELOG index d31d16d83..d23e471c0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/op/op.ExtensionMgr.php b/op/op.ExtensionMgr.php index 19a48dc15..9df8b72b6 100644 --- a/op/op.ExtensionMgr.php +++ b/op/op.ExtensionMgr.php @@ -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'))); } diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 03a2908c3..31d59d7dd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1388,7 +1388,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; break; default: if(!empty($value['addon'])) - echo ""; + echo ''; echo ''currentpwd', 'name'=>'currentpwd', 'autocomplete'=>'off', - 'required'=>true + 'required'=>true, + 'addon'=>'' ) ); if(!$disablechangepassword) { $this->formField( getMLText("new_password"), - '' + array( + 'element'=>'input', + 'type'=>'password', + 'id'=>'pwd', + 'name'=>'pwd', + 'class'=>'pwd', + 'autocomplete'=>'off', + 'required'=>true, + 'attributes'=>[['rel', 'strengthbar']], + 'addon'=>'' + ) ); + if($passwordstrength) { $this->formField( getMLText("password_strength"), @@ -122,6 +134,7 @@ $(document).ready( function() { 'id'=>'pwdconf', 'name'=>'pwdconf', 'autocomplete'=>'off', + 'addon'=>'' ) ); } diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 290bc6220..59eac9f42 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -77,8 +77,8 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { $html .= '
'; $html .= ''; if($this->getTheme() == 'bootstrap4' && $type == 'password') { - $html .= '
'; - $html .= ''; + $html .= '
'; + $html .= ''; $html .= '
'; } $html .= '
'; diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index 8e0ee517c..8f32d9bf6 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -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(); diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 5c874da96..e538e627f 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1299,12 +1299,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);; break; default: if(!empty($value['addon'])) - echo '
'; + echo '
'; echo '