Bug 17181: Check for duplicate image names when uploading image to patron card creator
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 11 Jan 2017 00:40:31 +0000 (00:40 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Jan 2017 12:28:07 +0000 (12:28 +0000)
commit2173b780c951a4d6abd990a212c6e6bb23fa37d7
tree600b9e9a43518cfeb64466f088bc52f85bdae3da
parenta2afebe115662ea5dcb8a98888f108d6730128ec
Bug 17181: Check for duplicate image names when uploading image to patron card creator

This patch adds a check for duplicates before uploading the image.

To test:
1) Go to Tools -> Patron card creator -> Manage images
2) If you haven't already, upload an image
3) Try to upload another image with the same image name
4) Notice the first image is replaced with the second image, with no
warning.
5) Apply patch and refresh page
6) Try to upload an image with the same image name again
7) Notice you are now warned about a duplicate image name.
8) Check that uploading an image with a unique name still works.

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc
patroncards/image-manage.pl