diff --git a/core/js/js.js b/core/js/js.js index e1fbd04a8d..1bb546f708 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -591,10 +591,20 @@ $(document).ready(function(){ } }); - // 'show password' checkbox - $('#password').showPassword(); - $('#adminpass').showPassword(); - $('#pass2').showPassword(); + var setShowPassword = function(input, label) { + input.showPassword().keyup(function(){ + if (input.val().length == 0) { + label.hide(); + } + else { + label.css("display", "inline").show(); + } + }); + label.hide(); + }; + setShowPassword($('#password'), $('label[for=show]')); + setShowPassword($('#adminpass'), $('label[for=show]')); + setShowPassword($('#pass2'), $('label[for=personal-show]')); //use infield labels $("label.infield").inFieldLabels({ diff --git a/settings/templates/personal.php b/settings/templates/personal.php index f3fd3f1010..03073069ab 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -38,7 +38,7 @@ if($_['passwordChangeSupported']) {