Bug 16752 - Remove the use of event attributes from some acquisitions templates ...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / itemtypes.tt
index bcd8c4d..95bbb7b 100644 (file)
@@ -21,7 +21,7 @@ Data deleted
 [% 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 'greybox.inc' %]
 [% INCLUDE 'datatables.inc' %]
 <script type="text/javascript">
@@ -43,6 +43,9 @@ Data deleted
                 rentalcharge: { number: true }
             }
         });
+        $("#itemtype").on("blur",function(){
+            toUC(this);
+        });
      });
 //]]>
 </script>
@@ -134,20 +137,22 @@ Item types administration
                 [% ELSE %]
                     <li>
                         <label for="itemtype" class="required">Item type: </label>
-                        <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" required="required" /> <span class="required">Required</span>
+                        <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" required="required" /> <span class="required">Required</span>
                     </li>
                 [% END %]
                 <li>
                     <label for="description" class="required">Description: </label>
                     <input type="text" id="description" name="description" size="48" value="[% itemtype.description |html %]" required="required" /> <span class="required">Required</span>
-                    <a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype.itemtype %]" title="Translate item type [% itemtype.itemtype %]" rel="gb_page_center[600,500]"><i class="icon-edit"></i> Translate into other languages</a>
+                    [% IF can_be_translated %]
+                        <a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype.itemtype %]" title="Translate item type [% itemtype.itemtype %]" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
+                    [% END %]
                 </li>
                 <li>
                     <span class="label">Search category</span>
                     <select id="searchcategory" name="searchcategory">
                     <option value="">None</option>
                         [% FOREACH cat IN searchcategory %]
-                            [% IF cat.selected %]
+                            [% IF cat.authorised_value == itemtype.searchcategory %]
                                 <option value="[% cat.authorised_value %]" selected="selected">
                                     [% cat.lib %]
                                 </option>
@@ -276,8 +281,8 @@ Item types administration
                     <label for="sip_media_type">SIP media type: </label>
                     <select id="sip_media_type" name="sip_media_type">
                         <option value=""></option>
-                        [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE', itemtype.sip_media_type ) %]
-                            [% IF a.selected %]
+                        [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
+                            [% IF a.authorised_value == itemtype.sip_media_type %]
                                 <option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option>
                             [% ELSE %]
                                 <option value="[% a.authorised_value %]">[% a.lib %]</option>
@@ -302,7 +307,7 @@ Item types administration
 [% END %]
 
 [% IF op == 'delete_confirm' %]
-    <div class="dialog message">
+    <div class="dialog alert">
         <h3>Delete item type '[% itemtype.itemtype %]'?</h3>
         <table>
             <tr>
@@ -322,9 +327,11 @@ Item types administration
         </table>
         <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
             <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
-            <input type="submit" class="approve" value="Delete this Item Type" />
+            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
+        </form>
+        <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
+            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
         </form>
-        <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post"><input type="submit" class="deny" value="Do Not Delete" /></form>
     </div>
 [% END %]
 
@@ -375,9 +382,9 @@ Item types administration
             [% END %]
             </td>
             <td>[% itemtype.checkinmsg | html_line_break %]</td>
-            <td>
-              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&amp;itemtype=[% itemtype.itemtype |html %]">Edit</a>
-              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&amp;itemtype=[% itemtype.itemtype |html %]">Delete</a>
+            <td class="actions">
+              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&amp;itemtype=[% itemtype.itemtype |html %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
+              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&amp;itemtype=[% itemtype.itemtype |html %]" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
             </td>
           </tr>
           [% END %]