Extending branch categories : adding search domains. partial commit.
[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 -->Add 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 -->Add 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="add_form" -->
84         
85
86 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
87 <input type="hidden" name="op" value="add_validate" />
88
89         <fieldset class="rows">
90         <legend><!-- TMPL_IF NAME="searchfield" -->
91                 Modify currency
92         <!-- TMPL_ELSE -->
93                 Add currency
94         <!-- /TMPL_IF --></legend>
95         <ol><!-- TMPL_IF NAME="searchfield" -->
96                 <li>
97                         <span class="label">Currency: </span>
98                         <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
99                         </li>
100         <!-- TMPL_ELSE -->
101                 <li>
102                         <label for="currency">Currency: </label>
103                         <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
104                         </li>
105         <!-- /TMPL_IF -->
106
107                 <li>
108                         <label for="rate">Rate: </label>
109                         <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
110                         </li></ol>
111         </fieldset>
112                 
113                 <input type="submit" value="Submit" onclick="Check(this.form)" /> 
114         </form>
115
116 <!-- /TMPL_IF -->
117
118 <!-- TMPL_IF NAME="add_validate" -->
119 <h3>Data Recorded</h3>
120 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" />
121         </form>
122 <!-- /TMPL_IF -->
123
124 <!-- TMPL_IF NAME="delete_confirm" -->
125 <table><caption>Confirm Deletion of Currency <!-- TMPL_VAR NAME="searchfield" --></caption>
126
127                 <tr>
128                         <th>Currency</th>
129                         <td><!-- TMPL_VAR NAME="searchfield" --></td>
130                 </tr>
131
132
133         
134                 <tr>
135                         <th>Rate</th>
136                         <td><!-- TMPL_VAR NAME="rate" --></td>
137                 </tr>
138                 </table>
139                 <!-- TMPL_IF NAME="totalgtzero" -->
140
141                                 <span class="alert">This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
142                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
143                                         <input type="submit" value="OK" />
144                                 </form>
145                 <!-- TMPL_ELSE -->
146         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
147                         <input type="hidden" name="op" value="delete_confirmed" />
148                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
149                                 <input type="submit" value="Delete this Currency" />
150                                 </form>
151                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
152                                         <input type="submit" value="Do Not Delete" />
153                                 </form>
154                 <!-- /TMPL_IF -->
155 <!-- /TMPL_IF -->
156
157 <!-- TMPL_IF NAME="delete_confirmed" -->
158 <h3>Currency Deleted</h3>
159 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
160                 <input type="submit" value="OK" />
161         </form>
162 <!-- /TMPL_IF -->
163
164 <!-- TMPL_IF NAME="else" -->
165
166 <h2>Currencies</h2>
167         <!-- TMPL_IF NAME="searchfield" -->
168                 You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
169         <!-- /TMPL_IF -->       
170
171         <table>
172                 <tr>
173                         <th>Currency</th>
174                         <th>Rate</th>
175                         <th colspan="2">&nbsp;</th>
176                 </tr>
177                 <!-- TMPL_LOOP NAME="loop" -->
178                 <tr>
179                         <td><!-- TMPL_VAR NAME="currency" --></td>
180                         <td><!-- TMPL_VAR NAME="rate" --></td>
181                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
182                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
183                 </tr>
184                 <!-- /TMPL_LOOP -->
185         </table>
186 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
187         <input type="hidden" name="op" value="add_form" />
188                 <input type="submit" value="Add Currency" />
189         </form>
190
191         
192         <!-- TMPL_IF NAME="offsetgtzero" -->
193                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
194         <!-- /TMPL_IF -->
195
196
197         <!-- TMPL_IF NAME="ltcount" -->
198                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
199         <!-- /TMPL_iF -->
200
201 <!-- /TMPL_IF -->
202
203
204 </div>
205 </div>
206 <div class="yui-b">
207 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
208 </div>
209 </div>
210 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->