]> git.koha-community.org Git - koha.git/commit
Bug 35344: Warn on patron image upload if missing cardnumber
authorDavid Cook <dcook@prosentient.com.au>
Thu, 16 Nov 2023 05:08:30 +0000 (05:08 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 14 Dec 2023 21:19:31 +0000 (21:19 +0000)
commit1b9a4d97545dafb9cbdd2f08f516375a9d393a5f
tree89d617335b2cb4a7ef15116afc1b39bf7b373c52
parent171d6cc32b4793f46a43b6e1941761845faf77da
Bug 35344: Warn on patron image upload if missing cardnumber

This change displays a warning message instead of the patron image
upload feature in the patron record when the patron is missing the
cardnumber.

Without this change, the staff user can try to upload a patron image
but it will silently fail. This change warns the staff user of the
cardnumber requirement for patron image upload.

Test plan:
0. Apply the patch
1. Enable the "patronimages" system preference
2. Go to http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
3. Click "Add" over the patron image placeholder
4. Note the "Upload photo" button and the ability to take a patron photo if your
device has a camera
5. Remove "cardnumber" from BorrowerMandatoryField
6. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
7. Edit the patron to remove the cardnumber
8. Click "Add" over the patron image placeholder
9. Note that no patron image upload features appear. Instead, only
a warning appears stating that the patron needs a cardnumber before
the patron image upload can be performed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 855b8bc66e3bf1d012d0caeab938556eb520fd51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0a8908bddb1a75f539e596893a257de0aac24fa6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
koha-tmpl/intranet-tmpl/prog/js/members-menu.js
koha-tmpl/intranet-tmpl/prog/js/patron-webcam.js