Bug 14695 - Add new circulation rule
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branches.tt
index 0f9af64..77356ac 100644 (file)
@@ -11,7 +11,7 @@
 [% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
 <script type="text/javascript">
@@ -40,7 +40,7 @@
 tinyMCE.init({
     mode : "textareas",
     theme : "advanced",
-    content_css : "[% themelang %]/css/tinymce.css",
+    content_css : "[% interface %]/[% theme %]/css/tinymce.css",
     plugins : "table,save,advhr,advlink,contextmenu",
     theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
     theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
@@ -79,7 +79,7 @@ tinyMCE.init({
     <div id="yui-main">
     <div class="yui-b">
 
-[% FOR m IN messages %]
+[% FOREACH m IN messages %]
     <div class="dialog [% m.type %]">
         [% SWITCH m.code %]
         [% CASE 'error_on_update' %]
@@ -218,7 +218,7 @@ tinyMCE.init({
 
 [% IF op == 'list' %]
     <h3>Libraries</h3>
-    [% IF libraries %]
+    [% IF libraries.count %]
         <table id="branchest">
             <thead>
                 <tr>
@@ -283,7 +283,7 @@ tinyMCE.init({
     [% IF group_types %]
         [% FOREACH group_type IN group_types %]
             <h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
-            [% IF group_type.categories %]
+            [% IF group_type.categories.size %]
                 <table>
                     <thead>
                         <tr>
@@ -323,7 +323,7 @@ tinyMCE.init({
 
 [% IF op == 'add_form_category' %]
     <h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3>
-    <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post">
+    <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post" class="validated">
         <input type="hidden" name="op" value="add_validate_category" />
         [% IF category.categorycode %]
             <input type="hidden" name="is_a_modif" value="1" />
@@ -336,13 +336,15 @@ tinyMCE.init({
                         <input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode |html %]" />
                         [% category.categorycode %]
                     [% ELSE %]
-                        <label for="categorycode">Category code:</label>
-                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" />
+                        <label for="categorycode" class="required">Category code:</label>
+                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
+                        <span class="required">Required</span>
                     [% END %]
                 </li>
                 <li>
-                    <label for="categoryname">Name: </label>
-                    <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" />
+                    <label for="categoryname" class="required">Name: </label>
+                    <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" class="required" required="required" />
+                    <span class="required">Required</span>
                 </li>
                 <li>
                     <label for="codedescription">Description: </label>
@@ -371,18 +373,23 @@ tinyMCE.init({
                 </li>
             </ol>
         </fieldset>
-        <fieldset class="action"><input type="submit" value="Update" /></fieldset>
+        <fieldset class="action">
+            <input type="submit" value="Submit" />
+            <a href="/cgi-bin/koha/admin/branches.pl" class="cancel">Cancel</a>
+        </fieldset>
     </form>
 [% END %]
 
 [% IF op == 'delete_confirm_category' %]
-    <div class="dialog message">
-    Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])?
+    <div class="dialog alert">
+    <h3>Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])?</h3>
     <form action="/cgi-bin/koha/admin/branches.pl" method="post">
         <input type="hidden" name="op" value="delete_confirmed_category" />
         <input type="hidden" name="categorycode" value="[% category.categorycode |html %]" />
-        <input type="submit" value="Delete" />
-        <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
+        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
+    </form>
+    <form action="/cgi-bin/koha/admin/branches.pl" method="get">
+        <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
     </form>
     </div>
 [% END %]