Bug 11793 - Use validation plugin when creating new item type
authorOwen Leonard <oleonard@myacpl.org>
Wed, 19 Feb 2014 17:29:34 +0000 (12:29 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 20 Feb 2014 16:58:32 +0000 (16:58 +0000)
commit1d9b86aabccf1bc916b6b27e568ad984caf081f6
treeccf4d834b50a935f9d2667dbd5282dccf94f6ed8
parent19bf1e9a40ab5a8f3c86fb07dd6429bfc44f703b
Bug 11793 - Use validation plugin when creating new item type

The page for adding a new item type includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> Item types -> New
item type. Try submitting the form with the following error conditions:

- Missing item type
- Missing description
- A non-number in the "rental charge" field

These errors should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing item type should also work 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>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt