Bugzilla – Attachment 161299 Details for
Bug 33457
Improve display of fund users when the patron has no firstname
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33457: Improve display of fund users when the patron has no firstname
Bug-33457-Improve-display-of-fund-users-when-the-p.patch (text/plain), 2.90 KB, created by
Martin Renvoize (ashimema)
on 2024-01-23 14:49:22 UTC
(
hide
)
Description:
Bug 33457: Improve display of fund users when the patron has no firstname
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-01-23 14:49:22 UTC
Size:
2.90 KB
patch
obsolete
>From 4c383d15c3346e43161b1fd7798ccc6d7963fc82 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 16 Jan 2024 12:57:34 +0000 >Subject: [PATCH] Bug 33457: Improve display of fund users when the patron has > no firstname > >This patch updates the way the fund modification page handles patron >names so that a patron with only a first name or only a surname will >have their name appear correctly when selected as a manager or a user. > >To test, apply the patch if necessary, create a patron with only a first >name and one with only a surname and give them acquisitions permissions. > >- Go to Administration -> Funds. >- Edit a fund. >- Click 'Add users'. >- Select a user, only staff users will be searchable >- Select one of the patrons you created. > - The patron name should appear correctly > - Test with both your first name only patron and your last name only > patron. >- Perform the same test with the 'Select owner' process. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index 11fc20a8e2b..715e0db2b47 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -650,7 +650,7 @@ > e.preventDefault(); > var borrowernumber = $(this).data("borrowernumber"); > var borrower_data = JSON.parse($("#borrower_data"+borrowernumber).val()); >- add_user( borrowernumber, borrower_data.firstname + " " + borrower_data.surname ); >+ add_user( borrowernumber, ( borrower_data.firstname ? borrower_data.firstname : "" ) + ' ' + ( borrower_data.surname ? borrower_data.surname : "" ) ); > }); > > $("body").on("click",".select_user",function(e){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >index cd26269a472..c6b95bb33cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >@@ -558,7 +558,7 @@ > > function select_user(borrowernumber, borrower) { > ownerRemove(); >- var borrowername = borrower.firstname + ' ' + borrower.surname; >+ var borrowername = ( borrower.firstname ? borrower.firstname : "" ) + ' ' + ( borrower.surname ? borrower.surname : "" ); > if (borrowernumber) { > var ownerlink = '<a href="/cgi-bin/koha/members/moremember.pl' > + '?borrowernumber=' + borrowernumber + '">' >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33457
:
161064
|
161124
| 161299 |
161300
|
161392
|
161395
|
161396