From 8deb7f77951eb909639ecb808cfa930a63d3b56a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 21 Aug 2024 10:31:09 +0000 Subject: [PATCH] Bug 37691: Improve visibility of password expiration reset link This patch moves the password expiration reset link into the error box so that it is more prominent. To test, apply the patch and rebuild the staff interface CSS: https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface Try to log in to the staff interface as a user whose password has expired. You will probably have to use SQL to update a patron record directly, e.g. UPDATE borrowers SET password_expiration_date = '2022-01-01' WHERE borrowernumber = X; When you submit your login details the page should reload with an error message: "Error: Your password has expired." Within the red dialog you should see the "You must reset your password" link. Sponsored-by: Athens County Public Libraries Signed-off-by: Sam Lau Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/css/login.css | 2 ++ .../intranet-tmpl/prog/en/modules/auth.tt | 30 +++++++++++-------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/login.css b/koha-tmpl/intranet-tmpl/prog/css/login.css index cccbb1e7b2..ae9aff87b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/login.css +++ b/koha-tmpl/intranet-tmpl/prog/css/login.css @@ -71,11 +71,13 @@ label { #login #login_error a:link, #login #login_error a:visited { color : #FFC; + text-decoration: underline; } #login #login_error a:hover, #login #login_error a:active { color : #FCFC4D; + text-decoration: underline; } #login h1 { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index ec76759dd3..897fb3a7b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -70,19 +70,25 @@ [% END %] [% IF too_many_login_attempts %] -
Error: This account has been locked!
- [% IF Categories.can_any_reset_password && Koha.Preference('OpacBaseURL') %] - You must reset your password. - [% END %] +
+ Error: + This account has been locked! + [% IF Categories.can_any_reset_password && Koha.Preference('OpacBaseURL') %] + Reset your password. + [% END %] +
[% ELSIF password_has_expired %] -
Error: Your password has expired!
- [% IF Koha.Preference('EnableExpiredPasswordReset') && Koha.Preference('OpacBaseURL') %] - You must reset your password. - [% ELSIF Categories.can_any_reset_password && Koha.Preference('OpacBaseURL') %] - You must reset your password. - [% ELSE %] -

You must contact the library to reset your password

- [% END %] +
+ Error: + Your password has expired! + [% IF Koha.Preference('EnableExpiredPasswordReset') && Koha.Preference('OpacBaseURL') %] + Reset your password. + [% ELSIF Categories.can_any_reset_password && Koha.Preference('OpacBaseURL') %] + Reset your password. + [% ELSE %] +

You must contact the library to reset your password

+ [% END %] +
[% ELSIF invalid_username_or_password %]
Error: Invalid username or password
[% ELSIF is_anonymous_patron %] -- 2.39.5