]> git.koha-community.org Git - koha.git/commit
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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 21 May 2014 08:06:07 +0000 (10:06 +0200)
commit4478890d55acd9171148a038b9362300b3ad7db9
tree0049ca668c2b8589b37d15d9d308ffe0e8e4aea8
parentb303105dc90910fd0b5faddc1a9495bd8034d213
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>
(cherry picked from commit 1d9b86aabccf1bc916b6b27e568ad984caf081f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt