]> 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)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 11 Dec 2023 18:41:25 +0000 (19:41 +0100)
commit855b8bc66e3bf1d012d0caeab938556eb520fd51
treeec09fdf0eaa7c6a0cfb0048a1ff96e0382e33a76
parent494ee7c68f1dc8437df0b53e55c35e758ccc3c27
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>
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