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