From 48f94584ab83882cd339dc0eb4b8674b6aab02db 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 --- 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 2b6d4478d6d..459eb4569c8 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 %]

Forgot your 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 6d6c135cc1a..4e769609d2e 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 %]
Reset your 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 %]

Forgot your 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 c41dc43e9f3..09336d5f20e 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 %]

Forgot your 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 fbadc0fb1c5..0adb5978a68 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 %]
Forgot your 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 %]
Forgot your password?
-- 2.34.1