From e634a5ad82e9fa0aef96ae5a23bb5b389d1704e7 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Followed test plan. Patch behaves as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Passes all tests and QA script, works as described. Signed-off-by: Galen Charlton --- koha-tmpl/intranet-tmpl/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 a480b7463a..02eaf3948d 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. -- 2.39.5