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 // prevents users to check active with a currency != 1
50 $("#rate").keyup(function() {
51 check_currency( $(this).val() );
53 check_currency( $("#rate").val() );
58 <body id="admin_currency" class="admin">
59 [% INCLUDE 'header.inc' %]
60 [% INCLUDE 'currencies-admin-search.inc' %]
64 <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 %]
65 [% IF ( delete_confirm ) %]Confirm deletion of currency '<span class="ex">[% searchfield %]</span>'[% END %]
66 [% IF ( delete_confirmed ) %]Currency deleted[% END %]
67 [% IF ( else ) %]Currencies[% END %]
70 <div id="doc3" class="yui-t2">
77 <div id="toolbar" class="btn-toolbar">
78 <a class="btn btn-small" id="newcurrency" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New currency</a>
84 <form action="[% script_name %]" name="Aform" method="post">
85 <input type="hidden" name="op" value="save" />
86 <fieldset class="rows">
87 <legend>[% IF ( searchfield ) %]
94 [% IF ( searchfield ) %]
95 <span class="label">Currency: </span>
96 <input type="hidden" name="currency" id="currency" value="[% searchfield %]" />[% searchfield %]
98 <label for="currency">Currency: </label>
99 <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
103 <label for="rate">Rate: </label>
104 <input type="text" name="rate" id="rate" size="10" maxlength="10" value="[% rate %]" />
107 <label for="symbol">Symbol: </label>
108 <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="[% symbol %]" />
112 <span class="label">Last updated: </span>[% timestamp %]
115 <label for="active">Active: </label>
117 <input type="checkbox" id="active" name="active" value="1" checked="checked" />
119 <input type="checkbox" id="active" name="active" value="1" />
121 <span id="hint" class="hint"></span>
127 <fieldset class="action">
128 <input type="submit" value="Submit" onclick="Check(this.form); return false;" />
129 <a href="/cgi-bin/koha/admin/currency.pl" class="cancel">Cancel</a>
135 [% IF ( delete_confirm ) %]
136 [% IF ( totalgtzero ) %]
137 <div class="dialog message">
138 <h3>Cannot delete currency <span class="ex">'[% searchfield %]'</span></h3>
139 <p>This currency is used [% total %] times. Deletion not possible</p>
140 <form action="[% script_name %]" method="post">
141 <input type="submit" value="OK" class="approve" />
145 <div class="dialog alert">
146 <h3>Confirm deletion of currency <span class="ex">'[% searchfield %]'</span></h3>
148 <tr><th>Currency</th>
149 <td>[% searchfield %]</td>
155 <form action="[% script_name %]" method="post">
156 <input type="hidden" name="op" value="delete_confirmed" />
157 <input type="hidden" name="searchfield" value="[% searchfield %]" />
158 <input type="submit" class="approve" value="Delete this Currency" />
160 <form action="[% script_name %]" method="post">
161 <input type="submit" class="deny" value="No, Do Not Delete" />
167 [% IF ( delete_confirmed ) %]
168 <div class="dialog message"><h3>Currency deleted</h3>
169 <form action="[% script_name %]" method="post">
170 <input type="submit" class="approve" value="OK" />
176 <h2>Currencies and exchange rates</h2>
178 [% 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 %]
181 [% IF ( searchfield ) %]
182 You searched for [% searchfield %]</span>
190 <th>Last updated</th>
192 <th colspan="2">Actions </th>
194 [% FOREACH loo IN loop %]
195 [% UNLESS ( loop.odd ) %]
196 <tr class="highlight">
200 <td>[% loo.currency %]</td>
201 <td>[% loo.rate %]</td>
202 <td>[% loo.symbol |html %]</td>
203 <td>[% loo.timestamp %]</td>
204 <td style="color:green;">[% IF ( loo.active ) %]✓[% END %]</td>
205 <td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.currency %]">Edit</a></td>
206 <td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.currency %]">Delete</a></td>
212 [% IF ( offsetgtzero ) %]
213 <a href="[% script_name %]?offset=[% prevpage %]"><< Previous</a>
217 <a href="[% script_name %]?offset=[% nextpage %]">Next >></a>
225 [% INCLUDE 'admin-menu.inc' %]
228 [% INCLUDE 'intranet-bottom.inc' %]