The upload local cover images form uses broken custom validation JavaScript which can be fixed by replacing it with HTML5 validation attributes in conjunction with Koha's built-in validation plugin (http://jqueryvalidation.org/documentation/).
Created attachment 25389 [details] [review] 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.
Created attachment 25405 [details] [review] 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>
Created attachment 25480 [details] [review] 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>
Pushed to master. Thanks, Owen!
Pushed to 3.14.x, will be in 3.14.07
Pushed to 3.12.x will be in 3.12.13