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