Bug 11785 - Use validation plugin when uploading local cover images
authorOwen Leonard <oleonard@myacpl.org>
Tue, 18 Feb 2014 17:13:39 +0000 (12:13 -0500)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 6 Jun 2014 12:32:24 +0000 (08:32 -0400)
commitc154bc548b8ce0915cf0f7a5dd7f692e28c3e527
treeaafc41fa6e91ad64eb74d691b47279256cbcc34f
parent4b0feb1a0f05f539e792e4e5e9e669fec7efcab7
Bug 11785 - Use validation plugin when uploading local cover images

When uploading local cover images the form should not be submitted if
no file has been selected. The existing form validation script doesn't
work. This patch adds HTML5 validation attributes and use of Koha's
built-in form validation plugin.

To test, apply the patch and go to Tools -> Upload local cover image.
Try to submit the form without selecting a file to upload. You should be
prevented from doing so. Choose a file and confirm that the upload
completes correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7faff33c8b9bd670cf7813f4cefb7aee38709ebb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc50362c231ceb9a410dcbcbce94b8124db1aa13)
koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt