removing warn and reindenting
[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 <script type="text/javascript">
10 //<![CDATA[
11     function toUC(f) {
12         var x=f.value.toUpperCase();
13         f.value=x;
14         return true;
15     }
16     function Check(f) {
17         var _alertString="";
18         var alertString2;
19         if (f.currency.value.length==0) {
20             _alertString += "- Currency name missing\n";
21         }
22         if (f.rate.value.length==0) {
23             _alertString += "- Rate missing\n";
24         }
25         if (f.symbol.value.length==0) {
26             _alertString += "- Symbol missing\n";
27         }
28         if (_alertString.length==0) {
29             document.Aform.submit();
30         } else {
31             alertString2 = "Form not submitted because of the following problem(s)\n";
32             alertString2 += "------------------------------------------------------------------------------------\n";
33             alertString2 += _alertString;
34             alert(alertString2);
35         }
36     }
37
38     $(document).ready(function() {
39         new YAHOO.widget.Button("newcurrency");
40     });
41 //]]>
42 </script>
43 </head>
44 <body>
45 <!-- TMPL_INCLUDE NAME="header.inc" -->
46 <!-- TMPL_INCLUDE NAME="currencies-admin-search.inc" -->
47
48
49
50 <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 -->
51 <!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
52 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>'<!-- /TMPL_IF -->
53 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
54 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF -->
55 </div>
56
57 <div id="doc3" class="yui-t2">
58
59 <div id="bd">
60     <div id="yui-main">
61     <div class="yui-b">
62     
63 <!-- TMPL_IF NAME="else" -->
64 <div id="toolbar">
65     <ul class="toolbar">
66     <li><a id="newcurrency" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Currency</a></li>
67 </ul></div>
68 <!-- /TMPL_IF -->
69
70 <!-- TMPL_IF NAME="add_form" -->
71
72 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
73     <input type="hidden" name="op" value="add_validate" />
74     <fieldset class="rows">
75     <legend><!-- TMPL_IF NAME="searchfield" -->
76         Modify currency
77     <!-- TMPL_ELSE -->
78         New currency
79     <!-- /TMPL_IF --></legend>
80     <ol>
81         <li>
82     <!-- TMPL_IF NAME="searchfield" -->
83             <span class="label">Currency: </span>
84             <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
85     <!-- TMPL_ELSE -->
86             <label for="currency">Currency: </label>
87             <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
88     <!-- /TMPL_IF -->
89         </li>
90         <li>
91             <label for="rate">Rate: </label>
92             <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
93         </li>
94         <li>
95             <label for="symbol">Symbol: </label>
96             <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="<!-- TMPL_VAR NAME="symbol" -->" />
97         </li>
98
99         <li>
100             <label for="currency">Last Updated: </label><!-- TMPL_VAR NAME="timestamp" -->
101         </li>
102         <li>
103             <label for="currency">Active: </label>
104             <input type="checkbox" id="active" name="active" value="1"
105             <!-- TMPL_IF NAME="active" --> checked <!-- /TMPL_IF -->   />
106         </li>
107
108         </ol>
109         </fieldset>
110         
111     <fieldset class="action">
112         <input type="submit" value="Submit" onclick="Check(this.form)" /> <a class="cancel" href="<!-- TMPL_VAR NAME="script_name" -->">Cancel</a>
113     </fieldset>
114     </form>
115
116 <!-- /TMPL_IF -->
117
118 <!-- TMPL_IF NAME="add_validate" -->
119 <div class="dialog message">
120     <h3>Data Recorded</h3>
121     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
122         <input type="submit" class="approve"  value="OK" />
123     </form>
124 </div>
125 <!-- /TMPL_IF -->
126
127 <!-- TMPL_IF NAME="delete_confirm" -->
128     <!-- TMPL_IF NAME="totalgtzero" -->
129     <div class="dialog message">
130         <h3>Cannot Delete Currencey <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
131         <p>This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</p>
132         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
133             <input type="submit" value="OK" class="approve" />
134         </form>
135     </div>
136     <!-- TMPL_ELSE -->
137     <div class="dialog alert">
138         <h3>Confirm Deletion of Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
139         <table>
140             <tr><th>Currency</th>
141                 <td><!-- TMPL_VAR NAME="searchfield" --></td>
142             </tr>
143             <tr><th>Rate</th>
144                 <td><!-- TMPL_VAR NAME="rate" --></td>
145             </tr>
146         </table>
147         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
148             <input type="hidden" name="op" value="delete_confirmed" />
149             <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
150             <input type="submit" class="approve" value="Delete this Currency" />
151         </form>
152         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
153             <input type="submit" class="deny" value="No, Do Not Delete" />
154         </form>
155     </div>
156     <!-- /TMPL_IF -->
157 <!-- /TMPL_IF -->
158
159 <!-- TMPL_IF NAME="delete_confirmed" -->
160 <div class="dialog message"><h3>Currency Deleted</h3>
161 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
162     <input type="submit" class="approve" value="OK" />
163 </form></div>
164 <!-- /TMPL_IF -->
165
166 <!-- TMPL_IF NAME="else" -->
167
168 <h2>Currencies and Exchange Rates</h2>
169     <!-- TMPL_IF NAME="searchfield" -->
170         You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
171     <!-- /TMPL_IF -->   
172
173     <table>
174         <tr>
175             <th>Currency</th>
176             <th>Rate</th>
177             <th>Symbol</th>
178             <th>Last Updated</th>
179             <th>Active</th>
180             <th colspan="2">Actions&nbsp;</th>
181         </tr>
182         <!-- TMPL_LOOP NAME="loop" -->
183         <!-- TMPL_UNLESS NAME="__odd__" -->
184         <tr class="highlight">
185         <!-- TMPL_ELSE -->
186         <tr>
187         <!-- /TMPL_UNLESS -->
188             <td><!-- TMPL_VAR NAME="currency" --></td>
189             <td><!-- TMPL_VAR NAME="rate" --></td>
190             <td><!-- TMPL_VAR NAME="symbol" ESCAPE="HTML" --></td>
191             <td><!-- TMPL_VAR NAME="timestamp" --></td>
192
193             <td><!-- TMPL_IF NAME="active" -->
194                 <font COLOR="#00FF00">✓</font>
195                 <!-- /TMPL_IF -->
196             </td>
197
198             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
199             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
200         </tr>
201         <!-- /TMPL_LOOP -->
202     </table>
203 <br>
204 <p><b>Hint:</b> Your 'active' currency should have it's exchange rate set to '1.00000'</p>
205
206     
207     <!-- TMPL_IF NAME="offsetgtzero" -->
208         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
209     <!-- /TMPL_IF -->
210
211     <!-- TMPL_IF NAME="ltcount" -->
212         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
213     <!-- /TMPL_IF -->
214
215 <!-- /TMPL_IF -->
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" -->