Bug 16752 - Remove the use of event attributes from some acquisitions templates ...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / currency.tt
index 8c39742..1bbacf2 100644 (file)
@@ -3,7 +3,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; Currencies &amp; Exchange rates &rsaquo;
 [% IF op == 'add_form' %][% IF currency %]Modify currency '[% currency.currency %]'[% ELSE %]New currency[% END %][% END %]
-[% IF op == 'delete_' %]Confirm deletion of currency '[% searchfield %]'[% END %]
+[% IF op == 'delete_confirm' %]Confirm deletion of currency '[% currency.currency %]'[% END %]
 [% IF op == 'list' %]Currencies[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 
     function check_currency(val) {
         if ( val == 1.0 ) {
-            $("#active").removeAttr('disabled');
+            $("#active").prop('disabled', false);
             $("#hint").html("");
         } else {
-            $("#active").removeAttr('checked');
-            $("#active").attr('disabled','disabled');
+            $("#active").prop('checked', false);
+            $("#active").prop('disabled', true);
             $("#hint").html(_("The active currency must have a rate of 1.0"));
         }
     }
@@ -38,6 +38,9 @@
             check_currency( $(this).val() );
         });
         check_currency( $("#rate").val() );
+        $("#currency_code").on("blur",function(){
+            toUC(this);
+        });
     });
 //]]>
 </script>
@@ -49,7 +52,7 @@
 
 
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;  <a href="/cgi-bin/koha/admin/currency.pl">Currencies &amp; Exchange rates</a> &rsaquo; [% IF op == 'add_form' %][% IF currency %]Modify currency '[% currency.currency %]'[% ELSE %]New currency[% END %][% END %]
-[% IF op == 'delete_confirm' %]Confirm deletion of currency '<span class="ex">[% searchfield %]</span>'
+[% IF op == 'delete_confirm' %]Confirm deletion of currency '[% '<span class="ex">' _ currency.currency _ '</span>' %]'
 [% ELSIF op == 'list' %]Currencies
 [% END %]
 </div>
                     <input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %]
                 [% ELSE %]
                     <label for="currency_code" class="required">Currency: </label>
-                    <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" onblur="toUC(this);" required="required" class="required" /> <span class="required">Required</span>
+                    <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span>
                 [% END %]
             </li>
             <li>
 [% IF op =='delete_confirm' %]
     [% IF nb_of_orders or nb_of_vendors %]
     <div class="dialog alert">
-        <h3>Cannot delete currency <span class="ex">'[% currency.currency %]'</span></h3>
+        <h3>Cannot delete currency '[% '<span class="ex">' _ currency.currency _ '</span>' %]'</h3>
         <p>
             [% IF nb_of_orders %]
                 This currency is used by [% nb_of_orders %] orders.
     </div>
     [% ELSE %]
     <div class="dialog alert">
-        <h3>Confirm deletion of currency <span class="ex">'[% currency.currency %]'</span></h3>
+        <h3>Confirm deletion of currency '[% '<span class="ex">' _ currency.currency _ '</span>' %]'</h3>
         <table>
             <tr><th>Currency</th>
                 <td>[% currency.currency %]</td>