[followup MT2343] fixing aqplan.tmpl
[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         // prevents users to check active with a currency != 1
42         $("#rate").keyup(function() {
43             if ( $(this).val() == 1.0 ) {
44                 $("#active").removeAttr('disabled');
45             } else {
46                 $("#active").removeAttr('checked');
47                 $("#active").attr('disabled','disabled');
48             }
49         });
50     });
51 //]]>
52 </script>
53 </head>
54 <body>
55 <!-- TMPL_INCLUDE NAME="header.inc" -->
56 <!-- TMPL_INCLUDE NAME="currencies-admin-search.inc" -->
57
58
59
60 <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 -->
61 <!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
62 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>'<!-- /TMPL_IF -->
63 <!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
64 <!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF -->
65 </div>
66
67 <div id="doc3" class="yui-t2">
68
69 <div id="bd">
70     <div id="yui-main">
71     <div class="yui-b">
72     
73 <!-- TMPL_IF NAME="else" -->
74 <div id="toolbar">
75     <ul class="toolbar">
76     <li><a id="newcurrency" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Currency</a></li>
77 </ul></div>
78 <!-- /TMPL_IF -->
79
80 <!-- TMPL_IF NAME="add_form" -->
81
82 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
83     <input type="hidden" name="op" value="add_validate" />
84     <fieldset class="rows">
85     <legend><!-- TMPL_IF NAME="searchfield" -->
86         Modify currency
87     <!-- TMPL_ELSE -->
88         New currency
89     <!-- /TMPL_IF --></legend>
90     <ol>
91         <li>
92     <!-- TMPL_IF NAME="searchfield" -->
93             <span class="label">Currency: </span>
94             <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
95     <!-- TMPL_ELSE -->
96             <label for="currency">Currency: </label>
97             <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
98     <!-- /TMPL_IF -->
99         </li>
100         <li>
101             <label for="rate">Rate: </label>
102             <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
103         </li>
104         <li>
105             <label for="symbol">Symbol: </label>
106             <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="<!-- TMPL_VAR NAME="symbol" -->" />
107         </li>
108
109         <li>
110             <label for="currency">Last Updated: </label><!-- TMPL_VAR NAME="timestamp" -->
111         </li>
112         <li>
113             <label for="currency">Active: </label>
114             <input type="checkbox" id="active" name="active" value="1"
115             <!-- TMPL_IF NAME="active" --> checked <!-- /TMPL_IF -->   />
116         </li>
117
118         </ol>
119         </fieldset>
120         
121     <fieldset class="action">
122         <input type="submit" value="Submit" onclick="Check(this.form)" />
123         <input type="button" onclick="window.location.href='<!-- TMPL_VAR NAME="script_name" -->'" value="Cancel" />
124     </fieldset>
125     </form>
126
127 <!-- /TMPL_IF -->
128
129 <!-- TMPL_IF NAME="add_validate" -->
130 <div class="dialog message">
131     <h3>Data Recorded</h3>
132     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
133         <input type="submit" class="approve"  value="OK" />
134     </form>
135 </div>
136 <!-- /TMPL_IF -->
137
138 <!-- TMPL_IF NAME="delete_confirm" -->
139     <!-- TMPL_IF NAME="totalgtzero" -->
140     <div class="dialog message">
141         <h3>Cannot Delete Currencey <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
142         <p>This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</p>
143         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
144             <input type="submit" value="OK" class="approve" />
145         </form>
146     </div>
147     <!-- TMPL_ELSE -->
148     <div class="dialog alert">
149         <h3>Confirm Deletion of Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
150         <table>
151             <tr><th>Currency</th>
152                 <td><!-- TMPL_VAR NAME="searchfield" --></td>
153             </tr>
154             <tr><th>Rate</th>
155                 <td><!-- TMPL_VAR NAME="rate" --></td>
156             </tr>
157         </table>
158         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
159             <input type="hidden" name="op" value="delete_confirmed" />
160             <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
161             <input type="submit" class="approve" value="Delete this Currency" />
162         </form>
163         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
164             <input type="submit" class="deny" value="No, Do Not Delete" />
165         </form>
166     </div>
167     <!-- /TMPL_IF -->
168 <!-- /TMPL_IF -->
169
170 <!-- TMPL_IF NAME="delete_confirmed" -->
171 <div class="dialog message"><h3>Currency Deleted</h3>
172 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
173     <input type="submit" class="approve" value="OK" />
174 </form></div>
175 <!-- /TMPL_IF -->
176
177 <!-- TMPL_IF NAME="else" -->
178
179 <h2>Currencies and Exchange Rates</h2>
180     <!-- TMPL_IF NAME="searchfield" -->
181         You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
182     <!-- /TMPL_IF -->   
183
184     <table>
185         <tr>
186             <th>Currency</th>
187             <th>Rate</th>
188             <th>Symbol</th>
189             <th>Last Updated</th>
190             <th>Active</th>
191             <th colspan="2">Actions&nbsp;</th>
192         </tr>
193         <!-- TMPL_LOOP NAME="loop" -->
194         <!-- TMPL_UNLESS NAME="__odd__" -->
195         <tr class="highlight">
196         <!-- TMPL_ELSE -->
197         <tr>
198         <!-- /TMPL_UNLESS -->
199             <td><!-- TMPL_VAR NAME="currency" --></td>
200             <td><!-- TMPL_VAR NAME="rate" --></td>
201             <td><!-- TMPL_VAR NAME="symbol" ESCAPE="HTML" --></td>
202             <td><!-- TMPL_VAR NAME="timestamp" --></td>
203             <td style="color:green;"><!-- TMPL_IF NAME="active" -->✓<!-- /TMPL_IF --></td>
204             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
205             <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
206         </tr>
207         <!-- /TMPL_LOOP -->
208     </table>
209 <br>
210     
211     <!-- TMPL_IF NAME="offsetgtzero" -->
212         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
213     <!-- /TMPL_IF -->
214
215     <!-- TMPL_IF NAME="ltcount" -->
216         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
217     <!-- /TMPL_IF -->
218
219 <!-- /TMPL_IF -->
220
221 </div>
222 </div>
223 <div class="yui-b">
224 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
225 </div>
226 </div>
227 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->