From 99c4ee22f889cee83ab4d0dca8ad7bb0e101e905 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 18 Aug 2016 11:58:42 -0400 Subject: [PATCH] Bug 11019 - Require some fields when adding authorized value category Content-Type: text/plain; charset="utf-8" This patch modifies the form for adding an authorized value so that category, authorized value, and description are required fields. Previously a new authorized value category could be saved with no data. To test, apply the patch and go to Administration -> Authorized values. - Click the "New category" button. - Click the save button without filling in category, authorized value, or description. You should be prevented from submitting the form. - Verify that filling in the required fields allows the form to be submitted. - Perform the same test when editing an existing authorized value. --- .../prog/en/modules/admin/authorised_values.tt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index 764fb53..284e018 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -76,28 +76,32 @@ $(document).ready(function() { [% IF ( action_modify ) %]
NOTE: If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.
[% END %] -
+
  1. - [% IF ( action_add_category ) %] - + [% IF ( action_add_category ) %] + + + Required [% ELSE %]Category [% category %] [% END %]
  2. - + [% IF ( action_modify ) %][% END %] [% IF ( action_add_category ) %] - + [% ELSE %] - + [% END %] + Required
  3. - - + + + Required
  4. -- 2.1.4