Fix for Bug 1853, Items not checked out label inconsistency
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / currency.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Currencies &amp; Exchange Rates &rsaquo; 
3 <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
4 <!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
5 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
6 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
7 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF --></title>
8 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
9 <style type="text/css">
10         .highlight { background-color: #ffffcc;}
11 </style>
12 <!-- TMPL_IF NAME="add_form" -->
13 <script type="text/javascript">
14 //<![CDATA[
15         //
16         function isNotNull(f,noalert) {
17                 if (f.value.length ==0) {
18    return false;
19                 }
20                 return true;
21         }
22         //
23         function toUC(f) {
24                 var x=f.value.toUpperCase();
25                 f.value=x;
26                 return true;
27         }
28         //
29         function isNum(v,maybenull) {
30         var n = new Number(v.value);
31         if (isNaN(n)) {
32                 return false;
33                 }
34         if (maybenull=="0" && v.value=="") {
35                 return false;
36         }
37         return true;
38         }
39         //
40         function isDate(f) {
41                 var t = Date.parse(f.value);
42                 if (isNaN(t)) {
43                         return false;
44                 }
45         }
46         //
47         function Check(f) {
48                 var ok=1;
49                 var _alertString="";
50                 var alertString2;
51                 if (f.currency.value.length==0) {
52                         _alertString += "- Currency name missing\\n";
53                 }
54                 if (f.rate.value.length==0) {
55                         _alertString += "- Rate missing\\n";
56                 }
57                 if (_alertString.length==0) {
58                         document.Aform.submit();
59                 } else {
60                         alertString2 = "Form not submitted because of the following problem(s)\\n";
61                         alertString2 += "------------------------------------------------------------------------------------\\n\\n";
62                         alertString2 += _alertString;
63                         alert(alertString2);
64                 }
65         }
66         //]]>
67 </script>
68                 <!-- /TMPL_IF -->
69 </head>
70 <body>
71 <!-- TMPL_INCLUDE NAME="header.inc" -->
72 <!-- TMPL_INCLUDE NAME="currencies-admin-search.inc" -->
73
74 <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; <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
75 <!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
76 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>'<!-- /TMPL_IF -->
77 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
78 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF --></div>
79
80 <div id="doc3" class="yui-t2">
81    
82    <div id="bd">
83         <div id="yui-main">
84         <div class="yui-b">
85         
86 <!-- TMPL_IF NAME="else" -->
87 <div id="toolbar">
88         <script type="text/javascript">
89         //<![CDATA[
90         // prepare DOM for YUI Toolbar
91          $(document).ready(function() {
92             yuiToolbar();
93          });
94         // YUI Toolbar Functions
95         function yuiToolbar() {
96             new YAHOO.widget.Button("newcurrency");
97         }       //]]>
98         </script>
99         <ul class="toolbar">
100         <li><a id="newcurrency" href="/cgi-bin/koha/admin/currency.pl?op=add_form">New Currency</a></li>
101 </ul></div>
102 <!-- /TMPL_IF -->
103
104 <!-- TMPL_IF NAME="add_form" -->
105
106 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
107 <input type="hidden" name="op" value="add_validate" />
108
109         <fieldset class="rows">
110         <legend><!-- TMPL_IF NAME="searchfield" -->
111                 Modify currency
112         <!-- TMPL_ELSE -->
113                 New currency
114         <!-- /TMPL_IF --></legend>
115         <ol>
116                 <li>
117         <!-- TMPL_IF NAME="searchfield" -->
118                         <span class="label">Currency: </span>
119                         <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
120         <!-- TMPL_ELSE -->
121                         <label for="currency">Currency: </label>
122                         <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
123         <!-- /TMPL_IF -->
124                 </li>
125         <li>
126                         <label for="rate">Rate: </label>
127                         <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
128                 </li>
129         <li>
130                         <label for="symbol">Symbol: </label>
131                         <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="<!-- TMPL_VAR NAME="symbol" -->" />
132                 </li>
133         <li>
134                         <label for="currency">Last Updated: </label><!-- TMPL_VAR NAME="timestamp" -->
135                 </li>
136                 </ol>
137         </fieldset>
138                 
139                 <fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form)" /> </fieldset>
140         </form>
141
142 <!-- /TMPL_IF -->
143
144 <!-- TMPL_IF NAME="add_validate" -->
145 <h3>Data Recorded</h3>
146 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" />
147         </form>
148 <!-- /TMPL_IF -->
149
150 <!-- TMPL_IF NAME="delete_confirm" -->
151                 <!-- TMPL_IF NAME="totalgtzero" -->
152 <div class="dialog message">            <h3>Cannot Delete Currencey <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
153                                                 <p>This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
154                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
155                                         <input type="submit" value="OK" class="approve" />
156                                 </form></div>
157                 <!-- TMPL_ELSE -->
158 <div class="dialog alert">              <h3>Confirm Deletion of Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
159 <table>
160                 <tr>
161                         <th>Currency</th>
162                         <td><!-- TMPL_VAR NAME="searchfield" --></td>
163                 </tr>
164         <tr>
165                         <th>Rate</th>
166                         <td><!-- TMPL_VAR NAME="rate" --></td>
167                 </tr>
168                 </table>
169
170
171         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
172                         <input type="hidden" name="op" value="delete_confirmed" />
173                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
174                                 <input type="submit" class="approve" value="Delete this Currency" />
175                                 </form>
176                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
177                                         <input type="submit" class="deny" value="No, Do Not Delete" />
178                                 </form></div>
179                 <!-- /TMPL_IF -->
180 <!-- /TMPL_IF -->
181
182 <!-- TMPL_IF NAME="delete_confirmed" -->
183 <h3>Currency Deleted</h3>
184 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
185                 <input type="submit" value="OK" />
186         </form>
187 <!-- /TMPL_IF -->
188
189 <!-- TMPL_IF NAME="else" -->
190
191 <h2>Currencies and Exchange Rates</h2>
192         <!-- TMPL_IF NAME="searchfield" -->
193                 You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
194         <!-- /TMPL_IF -->       
195
196         <table>
197                 <tr>
198                         <th>Currency</th>
199                         <th>Rate</th>
200                         <th>Symbol</th>
201                         <th>Last Updated</th>
202                         <th colspan="2">&nbsp;</th>
203                 </tr>
204                 <!-- TMPL_LOOP NAME="loop" -->
205                 <!-- TMPL_IF NAME="toggle" -->
206                 <tr class="highlight"><td class="highlight">
207                 <!-- TMPL_ELSE -->
208                 <tr><td>
209                 <!-- /TMPL_IF -->
210                             <!-- TMPL_VAR NAME="currency" --></td>
211                         <td><!-- TMPL_VAR NAME="rate" --></td>
212                         <td><!-- TMPL_VAR NAME="symbol" --></td>
213                         <td><!-- TMPL_VAR NAME="timestamp" --></td>
214                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
215             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
216                 </tr>
217                 <!-- /TMPL_LOOP -->
218         </table>
219         
220         <!-- TMPL_IF NAME="offsetgtzero" -->
221                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
222         <!-- /TMPL_IF -->
223
224         <!-- TMPL_IF NAME="ltcount" -->
225                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
226         <!-- /TMPL_IF -->
227
228 <!-- /TMPL_IF -->
229
230 </div>
231 </div>
232 <div class="yui-b noprint">
233 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
234 </div>
235 </div>
236 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->