Bug 16047: Making category code a required field on creating a group
authorAleisha <aleishaamohia@hotmail.com>
Thu, 10 Mar 2016 21:49:57 +0000 (21:49 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 22 Mar 2016 00:55:44 +0000 (00:55 +0000)
This will prevent users from creating a group without a category code,
which causes a software error when you try to delete it

To test:
1) Go to Admin -> Libraries and groups
2) Create new group without category code
3) Attempt to delete the group you just created and notice software
   error
4) Apply patch
5) Create new group without category code
6) Notice you now cannot save the group without putting in a category
  code

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt

index 0f9af64..b3e71f3 100644 (file)
@@ -337,7 +337,8 @@ tinyMCE.init({
                         [% category.categorycode %]
                     [% ELSE %]
                         <label for="categorycode">Category code:</label>
-                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" />
+                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
+                        <span class="required">Required</span>
                     [% END %]
                 </li>
                 <li>