From df0a9588086d420619a685d4d716f4fd2a5b4a97 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 24 May 2023 15:16:37 +0000 Subject: [PATCH] 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 Signed-off-by: David Cook Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 756de0f09a42245df72d9c85ed8487b898fc30cc) Signed-off-by: Martin Renvoize --- .../prog/en/modules/members/member-password.tt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt index 261611a1d8..d1d68b85c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt @@ -147,6 +147,15 @@ }); $("div.hint").eq(0).after(" "); + [% 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('
%s
'.format(_("You will be logged out if you modify your username"))); + } + }); + [% END %] + $(document).ajaxStart(function () { $("input[name^=newpassword]").hide(); $("label[for=newpassword2]").hide(); -- 2.39.5