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 <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2025-02-28 18:18:24 +00:00 committed by Katrin Fischer
parent 438137ebf6
commit a2eb209edb
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 7 additions and 4 deletions

View File

@ -77,7 +77,7 @@
<div class="alert alert-info">
<p
>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.</p
>
</div>

View File

@ -297,9 +297,12 @@
[% PROCESS display_errors %]
[% IF patronid && nouser %]
<div class="alert alert-warning">
<h3>Sorry</h3>
<p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
<div class="alert alert-info">
<p
>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.</p
>
</div>
[% END %]