1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Currencies & Exchange rates ›
3 [% IF ( add_form ) %][% IF ( searchfield ) %]Modify currency '[% searchfield %]'[% ELSE %]New currency[% END %][% END %]
4 [% IF ( delete_confirm ) %]Confirm deletion of currency '[% searchfield %]'[% END %]
5 [% IF ( delete_confirmed ) %]Currency deleted[% END %]
6 [% IF ( else ) %]Currencies[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <script type="text/javascript">
11 var x=f.value.toUpperCase();
18 if (f.currency.value.length==0) {
19 _alertString += _("- Currency name missing") + "\n";
21 if (f.rate.value.length==0) {
22 _alertString += _("- Rate missing") + "\n";
24 if (f.symbol.value.length==0) {
25 _alertString += _("- Symbol missing") + "\n";
27 if (_alertString.length==0) {
28 document.Aform.submit();
30 alertString2 = _("Form not submitted because of the following problem(s)") + "\n";
31 alertString2 += "------------------------------------------------------------------------------------\n";
32 alertString2 += _alertString;
37 function check_currency(val) {
39 $("#active").removeAttr('disabled');
42 $("#active").removeAttr('checked');
43 $("#active").attr('disabled','disabled');
44 $("#hint").html(_("The active currency must have a rate of 1.0"));
48 $(document).ready(function() {
49 new YAHOO.widget.Button("newcurrency");
51 // prevents users to check active with a currency != 1
52 $("#rate").keyup(function() {
53 check_currency( $(this).val() );
55 check_currency( $("#rate").val() );
60 <body id="admin_currency" class="admin">
61 [% INCLUDE 'header.inc' %]
62 [% INCLUDE 'currencies-admin-search.inc' %]
66 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/currency.pl">Currencies & Exchange rates</a> › [% IF ( add_form ) %][% IF ( searchfield ) %]Modify currency '[% searchfield %]'[% ELSE %]New currency[% END %][% END %]
67 [% IF ( delete_confirm ) %]Confirm deletion of currency '<span class="ex">[% searchfield %]</span>'[% END %]
68 [% IF ( delete_confirmed ) %]Currency deleted[% END %]
69 [% IF ( else ) %]Currencies[% END %]
72 <div id="doc3" class="yui-t2">
81 <li><a id="newcurrency" href="[% script_name %]?op=add_form">New currency</a></li>
87 <form action="[% script_name %]" name="Aform" method="post">
88 <input type="hidden" name="op" value="save" />
89 <fieldset class="rows">
90 <legend>[% IF ( searchfield ) %]
97 [% IF ( searchfield ) %]
98 <span class="label">Currency: </span>
99 <input type="hidden" name="currency" id="currency" value="[% searchfield %]" />[% searchfield %]
101 <label for="currency">Currency: </label>
102 <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
106 <label for="rate">Rate: </label>
107 <input type="text" name="rate" id="rate" size="10" maxlength="10" value="[% rate %]" />
110 <label for="symbol">Symbol: </label>
111 <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="[% symbol %]" />
115 <span class="label">Last updated: </span>[% timestamp %]
118 <label for="active">Active: </label>
120 <input type="checkbox" id="active" name="active" value="1" checked="checked" />
122 <input type="checkbox" id="active" name="active" value="1" />
124 <span id="hint" class="hint"></span>
130 <fieldset class="action">
131 <input type="submit" value="Submit" onclick="Check(this.form); return false;" />
132 <a href="/cgi-bin/koha/admin/currency.pl" class="cancel">Cancel</a>
138 [% IF ( delete_confirm ) %]
139 [% IF ( totalgtzero ) %]
140 <div class="dialog message">
141 <h3>Cannot delete currency <span class="ex">'[% searchfield %]'</span></h3>
142 <p>This currency is used [% total %] times. Deletion not possible</p>
143 <form action="[% script_name %]" method="post">
144 <input type="submit" value="OK" class="approve" />
148 <div class="dialog alert">
149 <h3>Confirm deletion of currency <span class="ex">'[% searchfield %]'</span></h3>
151 <tr><th>Currency</th>
152 <td>[% searchfield %]</td>
158 <form action="[% script_name %]" method="post">
159 <input type="hidden" name="op" value="delete_confirmed" />
160 <input type="hidden" name="searchfield" value="[% searchfield %]" />
161 <input type="submit" class="approve" value="Delete this Currency" />
163 <form action="[% script_name %]" method="post">
164 <input type="submit" class="deny" value="No, Do Not Delete" />
170 [% IF ( delete_confirmed ) %]
171 <div class="dialog message"><h3>Currency deleted</h3>
172 <form action="[% script_name %]" method="post">
173 <input type="submit" class="approve" value="OK" />
179 <h2>Currencies and exchange rates</h2>
181 [% IF ( loop ) %][% UNLESS ( activecurrency ) %]<div class="dialog alert"><h3>No active currency is defined</h3><p>Please edit one currency and mark it as active.</p></div>[% END %][% END %]
184 [% IF ( searchfield ) %]
185 You searched for [% searchfield %]</span>
193 <th>Last updated</th>
195 <th colspan="2">Actions </th>
197 [% FOREACH loo IN loop %]
198 [% UNLESS ( loop.odd ) %]
199 <tr class="highlight">
203 <td>[% loo.currency %]</td>
204 <td>[% loo.rate %]</td>
205 <td>[% loo.symbol |html %]</td>
206 <td>[% loo.timestamp %]</td>
207 <td style="color:green;">[% IF ( loo.active ) %]✓[% END %]</td>
208 <td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.currency %]">Edit</a></td>
209 <td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.currency %]">Delete</a></td>
215 [% IF ( offsetgtzero ) %]
216 <a href="[% script_name %]?offset=[% prevpage %]"><< Previous</a>
220 <a href="[% script_name %]?offset=[% nextpage %]">Next >></a>
228 [% INCLUDE 'admin-menu.inc' %]
231 [% INCLUDE 'intranet-bottom.inc' %]