Bug 39576: Show preferred_name for hiddenborrowername

The last patron menu uses the value "hiddenborrowername." I've made that use preferred_name instead of firstname. When a patron's preferred_name is not manually set/edited, it automatically takes the value of firstname, so we don't need an IF in the template toolkit here.

To test:
1 - have a patron with a preferred_name and one without
2 - get both patrons in the Last Patron dropdown, confirm they both show firstname
3 - apply patch, restart services, clear cache, reload page
4 - get your patrons in Last Patron again, confirm now one shows preferred name and the other firstname

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 829186d77d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Andrew Fuerste Henry 2025-04-08 12:32:04 +00:00 committed by Fridolin Somers
parent 5748ef0ebc
commit 9ec67bcba2
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@
[% IF Koha.Preference('showLastPatron') %]
<input type="hidden" id="hiddenborrowernumber" value="[% patron.borrowernumber | html %]">
<input type="hidden" id="hiddenborrowername" value="[% patron.surname | html %] [% patron.firstname | html %]">
<input type="hidden" id="hiddenborrowername" value="[% patron.surname | html %] [% patron.preferred_name | html %]">
<input type="hidden" id="hiddenborrowercard" value="[% patron.cardnumber | html %]">
[% END %]