Summary: | Use validation plugin when creating a patron attribute type | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | System Administration | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, kyle, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
URL: | /cgi-bin/koha/admin/patron-attr-types.pl | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 16299 - Use validation plugin when creating a patron attribute type
Bug 16299 - Use validation plugin when creating a patron attribute type Bug 16299 - Use validation plugin when creating a patron attribute type |
Description
Owen Leonard
2016-04-19 17:38:45 UTC
Created attachment 50434 [details] [review] Bug 16299 - Use validation plugin when creating a patron attribute type This patch replaces custom client-side form validation with use of the jQuery validation plugin. Besides reducing the amount of code in the template, this allows us to eliminate use of "onclick." This patch also makes a correction for HTML validity: <option value="" /> is not accepted. I have also added an id attribute to a <select> which lacked it. To test, apply the patch and go to Administration -> Patron attribute types. - Test creating a new patron attribute type. Try to submit the form without a code, description, or both. You should be prevented from doing so. - Test editing an existing patron attribute type. You should not be able to remove the description and have it save successfully. Created attachment 50499 [details] [review] Bug 16299 - Use validation plugin when creating a patron attribute type This patch replaces custom client-side form validation with use of the jQuery validation plugin. Besides reducing the amount of code in the template, this allows us to eliminate use of "onclick." This patch also makes a correction for HTML validity: <option value="" /> is not accepted. I have also added an id attribute to a <select> which lacked it. To test, apply the patch and go to Administration -> Patron attribute types. - Test creating a new patron attribute type. Try to submit the form without a code, description, or both. You should be prevented from doing so. - Test editing an existing patron attribute type. You should not be able to remove the description and have it save successfully. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 50596 [details] [review] Bug 16299 - Use validation plugin when creating a patron attribute type This patch replaces custom client-side form validation with use of the jQuery validation plugin. Besides reducing the amount of code in the template, this allows us to eliminate use of "onclick." This patch also makes a correction for HTML validity: <option value="" /> is not accepted. I have also added an id attribute to a <select> which lacked it. To test, apply the patch and go to Administration -> Patron attribute types. - Test creating a new patron attribute type. Try to submit the form without a code, description, or both. You should be prevented from doing so. - Test editing an existing patron attribute type. You should not be able to remove the description and have it save successfully. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for the 16.05 release! Thanks Owen! |