From a4623ad5d327fa597a612762cc8c17351c7a3878 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 29 Feb 2016 11:53:14 -0500 Subject: [PATCH] Bug 15938 - Use validation plugin when adding or editing classification sources and filing rules Content-Type: text/plain; charset="utf-8" In Administration -> Classification sources there is some embedded JavaScript which checks for empty form values. This patch removes that JS and adds validation using the globally-included validation plugin instead. To test, apply the patch and go to Administration -> Classification sources. - Click to add a new classification source and confirm that you cannot submit the form with empty required values. - Edit an existing classification source and confirm that you cannot empty a required field and submit the form. - Repeat the previous two steps with filing rules. https://bugs.koha-community.org/show_bug.cgi?id=15930 --- .../prog/en/modules/admin/classsources.tt | 90 ++++++---------------- 1 file changed, 23 insertions(+), 67 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt index 9c854eb..b5a9c2e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt @@ -17,56 +17,8 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] - - + [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] @@ -101,7 +53,7 @@ function CheckRuleForm(f) { [% ELSE %]

Add classification source

[% END %] -
+
    @@ -111,20 +63,21 @@ function CheckRuleForm(f) { [% class_source %] [% ELSE %] - - + + + Required [% END %] -
  1. - +
  2. + + Required
  3. [% IF ( used ) %][% ELSE %] [% END %]
  4. -
  5. - [% FOREACH rules_dropdow IN rules_dropdown %] [% IF ( rules_dropdow.selected ) %] @@ -133,11 +86,12 @@ function CheckRuleForm(f) { [% END %] [% END %] + Required
- + Cancel
@@ -149,7 +103,7 @@ function CheckRuleForm(f) { [% ELSE %]

Add filing rule

[% END %] -
+
    @@ -159,16 +113,17 @@ function CheckRuleForm(f) { [% sort_rule %] [% ELSE %] - - + + + Required [% END %] -
  1. - +
  2. + + Required
  3. -
  4. - [% FOREACH routines_dropdow IN routines_dropdown %] [% IF ( routines_dropdow.selected ) %] @@ -177,11 +132,12 @@ function CheckRuleForm(f) { [% END %] [% END %] + Required
- + Cancel
-- 2.1.4