From 312195cad87852669152198571d2ac7a2f7f1e32 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 28 Feb 2025 18:18:24 +0000 Subject: [PATCH] Bug 39217: Fix ugly error on wrong password in SCO login This patch updates the self checkout page so that it uses the same message as the regular OPAC in response to a user trying to log in with incorrect credentials. To test, apply the patch enable the self checkout module if necessary. - Set the SelfCheckoutByLogin system preference to "cardnumber" - Test the process of logging in as a patron to self checkout: Submitting an invalid library card number should trigger an error. - Set the SelfCheckoutByLogin system preference to "username and password." - Test this login form by submitting a valid card number or username and an invalid password. You should see the same error message. - NOTE: If you submit an invalid card number or username you will get no message at all, which is a bug in and of itself. QA note: I think the qa tool warning is an error in the tidy check. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Lucas Gass --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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 5414b9e6ef3..6dfe88d4be1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -77,7 +77,7 @@

You entered an incorrect username or password. Please try again! But note that passwords are case - sensitive[% IF Koha.Preference('FailedLoginAttempts') %]and that your account will be locked out after a fixed number of failed login attempts[% END %]. Please contact a library staff member if you + sensitive[% IF Koha.Preference('FailedLoginAttempts') %] and that your account will be locked after a fixed number of failed login attempts[% END %]. Please contact a library staff member if you continue to have problems.

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 15f863e1228..55122a58b34 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -296,9 +296,12 @@ [% PROCESS display_errors %] [% IF patronid && nouser %] -
-

Sorry

-

The userid [% patronid | html %] was not found in the database. Please try again.

+
+

You entered an incorrect username or password. Please try again! But note that passwords are case + sensitive[% IF Koha.Preference('FailedLoginAttempts') %] and that your account will be locked after a fixed number of failed login attempts[% END %]. Please contact a library staff member if you + continue to have problems.

[% END %] -- 2.39.5