]> 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 12 Dec 2023 07:40:15 +0000 (21:40 -1000)
commit0a8908bddb1a75f539e596893a257de0aac24fa6
tree67b91f3bfcc9c53fe044788f24cd75b9dfc0d2d4
parent95c36cb3882efdf436924f49dd364c050f65d259
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>
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