From 591b2870d7cff88356a76cd2e971e627b6ed8719 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Mon, 9 Feb 2026 11:52:05 +0200 Subject: [PATCH] Bug 41796: "Forgot your password" link is not visible if OpacResetPassword is enabled but OpacPasswordChange is disabled Before applying this patch, to reproduce the issue: 1. Set system preference OpacResetPassword to 'not allowed' 2. Set system preference OpacPasswordChange to 'Don't allow' 3. Set preference opacuserlogin to 'Allow' 4. Navigate to OPAC 5. Observe no "Forgot your password?" link on the OPAC main page 6. Set system preference OpacResetPassword to 'allowed' 7. Observe no "Forgot your password?" link on the OPAC main page 8. Set system preference OpacPasswordChange 'Allow' 9. Observe "Forgot your password?" link is present on the OPAC main page. Instead, it should be already present when OpacResetPassword is allowed. To test this patch: 1. Apply this patch 2. Set system preference OpacResetPassword to 'not allowed' 3. Set system preference OpacPasswordChange to 'Don't allow' 4. Set preference opacuserlogin to 'Allow' 5. Navigate to OPAC 6. Observe no "Forgot your password?" link on the OPAC main page 7. Set system preference OpacResetPassword to 'allowed' 8. Observe "Forgot your password?" link is present Signed-off-by: Bo Gustavsson --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-reset-password.tt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 2b6d447..459eb45 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -515,7 +515,7 @@ [% IF OpacLoginInstructions %]
[% PROCESS koha_news_block news => OpacLoginInstructions %]
[% END %] - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt index 6d6c135..4e76960 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -220,7 +220,7 @@ [% END %] [% IF Koha.Preference('EnableExpiredPasswordReset') %] Reset your password. - [% ELSIF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% ELSIF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] @@ -272,7 +272,7 @@

If you don't have a library card, stop by your local library to sign up.

[% END # / IF OpacLoginInstructions %] - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index c41dc43..09336d5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -209,7 +209,7 @@ [% IF ( OpacLoginInstructions ) %]
[% PROCESS koha_news_block news => OpacLoginInstructions %]
[% END %] - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt index fbadc0f..0adb597 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt @@ -104,7 +104,7 @@ - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] @@ -113,7 +113,7 @@ [% END # /IF Error_messages %] [% ELSE %]

Resetting your password has not been enabled by the library.

- [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] -- 2.43.0