From 1bc45a470e55bcbb5e4031c001749a1ec9b35160 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 8 Jun 2017 15:19:22 +0000 Subject: [PATCH] Bug 18752 - Automatic item modifications by age should allow 'blank' values This patch modifies the automatic item modification by age template to correct errors in form validation: - Age in days should not be required - A value should not be required in substitutions. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Automatic item modification by age. - Confirm that when editing or creating a rule the only required field is the substitutions field name. Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- .../tools/automatic_item_modification_by_age.tt | 12 +++++------- .../prog/js/automatic_item_modification_by_age.js | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt index 946ad3a492..44aa3ff4b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/automatic_item_modification_by_age.tt @@ -85,8 +85,7 @@
Age in days
- - Required +
Conditions
@@ -124,10 +123,10 @@ [% END %] = - + Add a substitution Remove substitution - Required + A field name is required
[% END %] @@ -148,7 +147,6 @@
Age in days
- Required
Conditions
@@ -175,10 +173,10 @@ [% END %] = - + Add a substitution Remove substitution - Required + A field name is required
diff --git a/koha-tmpl/intranet-tmpl/prog/js/automatic_item_modification_by_age.js b/koha-tmpl/intranet-tmpl/prog/js/automatic_item_modification_by_age.js index d14b55a3e4..6c37d9b210 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/automatic_item_modification_by_age.js +++ b/koha-tmpl/intranet-tmpl/prog/js/automatic_item_modification_by_age.js @@ -117,7 +117,6 @@ $(document).ready(function() { }); jQuery.validator.addClassRules("age", { - required: true, digits: true }); -- 2.39.5