Bug 16299 - Use validation plugin when creating a patron attribute type
authorOwen Leonard <oleonard@myacpl.org>
Tue, 19 Apr 2016 17:58:12 +0000 (13:58 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 15:38:22 +0000 (15:38 +0000)
commitfef8129588ee6715931c5565a6e493104b5e48c0
tree36c54a3deb6b665127c7c2e05c33e304d40948e9
parent97b27b94bb79525ca630f8e902bb44c1a96c9d73
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt