Bug 33820: (follow-up) Add hint to member-password.tt
This follow-up makes the same change to the "Change password" template. Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8e611b79f1
commit
756de0f09a
|
|
@ -147,6 +147,15 @@
|
|||
});
|
||||
$("div.hint").eq(0).after(" <div class=\"hint\"><a href=\"#\" id=\"fillrandom\">"+_("Click to fill with a randomly generated suggestion. ")+"<strong>"+_("Passwords will be displayed as text")+"</strong>.</a></div>");
|
||||
|
||||
[% IF logged_in_user.borrowernumber == patron.borrowernumber %]
|
||||
$("#newuserid").on("change", function(){
|
||||
$(this).parent().find("div.hint").remove();
|
||||
if ( "[% patron.userid | html %]" != $(this).val() ) {
|
||||
$(this).parent().append('<div class="hint">%s</div>'.format(_("You will be logged out if you modify your username")));
|
||||
}
|
||||
});
|
||||
[% END %]
|
||||
|
||||
$(document).ajaxStart(function () {
|
||||
$("input[name^=newpassword]").hide();
|
||||
$("label[for=newpassword2]").hide();
|
||||
|
|
|
|||
Loading…
Reference in New Issue