From 721c290501a7659c4145bae67db952abfea9e202 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Fri, 8 Nov 2024 14:17:00 +0100 Subject: [PATCH] Bug 25947: (follow-up) Improve locked account message Test plan: To test: 1. Change system preference 'FailedLoginAttempts' to a small number, like 2 2. Go to a patron's account and copy their username (while you're there, change the password and add some fines, too) 3. In the OPAC, try to log in with the username and a wrong password 3 times 4. Go back to the patron's account in the staff interface 5. Note that there is a message : "Patron's account has been locked (due to 3 failed login attempts)". Note there is a tooltip at the right 6. Click on "Change password", you go to change password page Note: the follow-up might be unclear to understand: 1 - it moves the button outriste the IF patron.login_attempt < 0 2 - Hence it requires the to be moved out so button remains on the lane 3 - Finally the
  • must be put before the if and changed a bit --- .../prog/en/includes/patron_messages.inc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index 7dc7040b..fa96068e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -53,20 +53,19 @@ [% END %] [% IF patron.account_locked %] - [% IF patron.login_attempts < 0 %] -
  • - Locked: Patron's account has been administratively locked -
  • - [% ELSE %] -
  • - Locked: Patron's account has been locked (due to [% patron.login_attempts | html %] failed login attempts) +
  • + [% IF patron.login_attempts < 0 %] + Locked: Patron's account has been administratively locked + [% ELSE %] + Locked: Patron's account has been locked (due to [% patron.login_attempts | html %] failed login attempts) + [% END %] [% IF CAN_user_borrowers_edit_borrowers %] Change password + [% END %] -
  • - [% END %] + [% END %] -- 2.30.2