Modifications to enable YUI-Grids layout structure. Unfinished.
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / currency.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; System Administration &rsaquo;
3 <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL 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_INCLUDE NAME="header.inc" -->
10
11 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
12
13 <div id="doc3" class="yui-t2">
14    
15    <div id="bd">
16         <div id="yui-main">
17         <div class="yui-b"><div class="yui-g">
18
19 <!-- TMPL_IF NAME="add_form" -->
20         <script>
21         //
22         function isNotNull(f,noalert) {
23                 if (f.value.length ==0) {
24    return false;
25                 }
26                 return true;
27         }
28         //
29         function toUC(f) {
30                 var x=f.value.toUpperCase();
31                 f.value=x;
32                 return true;
33         }
34         //
35         function isNum(v,maybenull) {
36         var n = new Number(v.value);
37         if (isNaN(n)) {
38                 return false;
39                 }
40         if (maybenull=="0" && v.value=="") {
41                 return false;
42         }
43         return true;
44         }
45         //
46         function isDate(f) {
47                 var t = Date.parse(f.value);
48                 if (isNaN(t)) {
49                         return false;
50                 }
51         }
52         //
53         function Check(f) {
54                 var ok=1;
55                 var _alertString="";
56                 var alertString2;
57                 if (f.currency.value.length==0) {
58                         _alertString += "- Currency name missing\\n";
59                 }
60                 if (f.rate.value.length==0) {
61                         _alertString += "- Rate missing\\n";
62                 }
63                 if (_alertString.length==0) {
64                         document.Aform.submit();
65                 } else {
66                         alertString2 = "Form not submitted because of the following problem(s)\\n";
67                         alertString2 += "------------------------------------------------------------------------------------\\n\\n";
68                         alertString2 += _alertString;
69                         alert(alertString2);
70                 }
71         }
72         </script>
73
74 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
75 <input type="hidden" name="op" value="add_validate" />
76
77         <table>
78         <caption><!-- TMPL_IF NAME="searchfield" -->
79                 Modify currency
80         <!-- TMPL_ELSE -->
81                 Add currency
82         <!-- /TMPL_IF --></caption>
83         <!-- TMPL_IF NAME="searchfield" -->
84                 <tr>
85                         <th>Currency</th>
86                         <td>
87                                 <input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
88                         </td>
89                 </tr>
90         <!-- TMPL_ELSE -->
91                 <tr>
92                         <th>Currency</th>
93                         <td>
94                                 <input type="text" name="currency" size="50" maxlength="50" onblur="toUC(this);" />
95                         </td>
96                 </tr>
97         <!-- /TMPL_IF -->
98
99                 <tr>
100                         <th>Rate</th    >
101                         <td>
102                                 <input type="text" name="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
103                         </td>
104                 </tr>
105         </table>
106                 
107                 <input type="button" value="OK" onclick="Check(this.form)" /> <input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" />
108         </form>
109
110 <!-- /TMPL_IF -->
111
112 <!-- TMPL_IF NAME="add_validate" -->
113 <h3>Data Recorded</h3>
114 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" />
115         </form>
116 <!-- /TMPL_IF -->
117
118 <!-- TMPL_IF NAME="delete_confirm" -->
119 <table><caption>Confirm Deletion of Currency <!-- TMPL_VAR NAME="searchfield" --></caption>
120
121                 <tr>
122                         <th>Currency</th>
123                         <td><!-- TMPL_VAR NAME="searchfield" --></td>
124                 </tr>
125
126
127         
128                 <tr>
129                         <th>Rate</th>
130                         <td><!-- TMPL_VAR NAME="rate" --></td>
131                 </tr>
132                 </table>
133                 <!-- TMPL_IF NAME="totalgtzero" -->
134
135                                 <span class="alert">This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
136                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
137                                         <input type="submit" value="OK" />
138                                 </form>
139                 <!-- TMPL_ELSE -->
140         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
141                         <input type="hidden" name="op" value="delete_confirmed" />
142                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
143                                 <input type="submit" value="Delete this Currency" />
144                                 </form>
145                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
146                                         <input type="submit" value="Do Not Delete" />
147                                 </form>
148                 <!-- /TMPL_IF -->
149 <!-- /TMPL_IF -->
150
151 <!-- TMPL_IF NAME="delete_confirmed" -->
152 <h3>Currency Deleted</h3>
153 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
154                 <input type="submit" value="OK" />
155         </form>
156 <!-- /TMPL_IF -->
157
158 <!-- TMPL_IF NAME="else" -->
159
160 <h2>Currencies Management</h2>
161         <!-- TMPL_IF NAME="searchfield" -->
162                 You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
163         <!-- /TMPL_IF -->       
164         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
165                 <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
166                 <input type="submit" name="Search" value="Search" />
167         </form> 
168         <table>
169                 <tr>
170                         <th>Currency</th>
171                         <th>Rate</th>
172                         <th colspan="2">&nbsp;</th>
173                 </tr>
174                 <!-- TMPL_LOOP NAME="loop" -->
175                 <tr>
176                         <td><!-- TMPL_VAR NAME="currency" --></td>
177                         <td><!-- TMPL_VAR NAME="rate" --></td>
178                         <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" value="Edit" /></form></td>
179                         <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" value="Delete" /></form></td>
180                 </tr>
181                 <!-- /TMPL_LOOP -->
182         </table>
183 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
184         <input type="hidden" name="op" value="add_form" />
185                 <input type="submit" value="Add Currency" />
186         </form>
187
188         
189         <!-- TMPL_IF NAME="offsetgtzero" -->
190                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
191         <!-- /TMPL_IF -->
192
193
194         <!-- TMPL_IF NAME="ltcount" -->
195                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
196         <!-- /TMPL_iF -->
197
198 <!-- /TMPL_IF -->
199
200
201 </div>
202 </div>
203 </div>
204
205 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
206 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->