From 91bb2a205a09c12705667035f12c3778e2f62081 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 20 Feb 2014 16:08:02 -0500 Subject: [PATCH] Bug 11806 - Use validation plugin when creating new OAI set Content-Type: text/plain; charset="utf-8" The form for adding a new OAI indicates that two fields are required but does nothing to enforce this rule. This can be handled client-side with HTML5 validation attributes and Koha's built-in validation plugin. This patch implements this. To test, apply the patch and go to Administration -> OAI sets configuration -> New set. Try submitting the form without entering a setSpec and/or setName. Doing so should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing set should also work correctly. --- .../prog/en/modules/admin/oai_sets.tt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt index a480b74..02eaf39 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt @@ -32,7 +32,7 @@ function delDescField(minusButton) {
[% IF ( op_new || op_mod ) %] -
+ [% IF ( op_new ) %]

Add a new OAI set

@@ -45,11 +45,13 @@ function delDescField(minusButton) {
  1. - + + Required
  2. - + + Required
  3. [% FOREACH desc IN descriptions %]
  4. -- 1.7.9.5