adding tab management for auth-subfield, like the one we have for biblio_subfield
[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 <!-- 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 -->New 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 '<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>'<!-- /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="else" -->
84 <div id="toolbar">
85         <script type="text/javascript">
86         //<![CDATA[
87         // prepare DOM for YUI Toolbar
88          $(document).ready(function() {
89             yuiToolbar();
90          });
91         // YUI Toolbar Functions
92         function yuiToolbar() {
93             new YAHOO.widget.Button("newcurrency");
94         }       //]]>
95         </script>
96         <ul class="toolbar">
97         <li><a id="newcurrency" href="/cgi-bin/koha/admin/currency.pl?op=add_form">New Currency</a></li>
98 </ul></div>
99 <!-- /TMPL_IF -->
100
101 <!-- TMPL_IF NAME="add_form" -->
102         
103
104 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
105 <input type="hidden" name="op" value="add_validate" />
106
107         <fieldset class="rows">
108         <legend><!-- TMPL_IF NAME="searchfield" -->
109                 Modify currency
110         <!-- TMPL_ELSE -->
111                 New currency
112         <!-- /TMPL_IF --></legend>
113         <ol><!-- TMPL_IF NAME="searchfield" -->
114                 <li>
115                         <span class="label">Currency: </span>
116                         <input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
117                         </li>
118         <!-- TMPL_ELSE -->
119                 <li>
120                         <label for="currency">Currency: </label>
121                         <input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
122                         </li>
123         <!-- /TMPL_IF -->
124
125                 <li>
126                         <label for="rate">Rate: </label>
127                         <input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
128                         </li></ol>
129         </fieldset>
130                 
131                 <fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form)" /> </fieldset>
132         </form>
133
134 <!-- /TMPL_IF -->
135
136 <!-- TMPL_IF NAME="add_validate" -->
137 <h3>Data Recorded</h3>
138 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" />
139         </form>
140 <!-- /TMPL_IF -->
141
142 <!-- TMPL_IF NAME="delete_confirm" -->
143                 <!-- TMPL_IF NAME="totalgtzero" -->
144 <div class="dialog message">            <h3>Cannot Delete Currencey <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
145                                                 <p>This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
146                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
147                                         <input type="submit" value="OK" class="approve" />
148                                 </form></div>
149                 <!-- TMPL_ELSE -->
150 <div class="dialog alert">              <h3>Confirm Deletion of Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
151 <table>
152                 <tr>
153                         <th>Currency</th>
154                         <td><!-- TMPL_VAR NAME="searchfield" --></td>
155                 </tr>
156         <tr>
157                         <th>Rate</th>
158                         <td><!-- TMPL_VAR NAME="rate" --></td>
159                 </tr>
160                 </table>
161
162
163         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
164                         <input type="hidden" name="op" value="delete_confirmed" />
165                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
166                                 <input type="submit" class="approve" value="Delete this Currency" />
167                                 </form>
168                                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
169                                         <input type="submit" class="deny" value="No, Do Not Delete" />
170                                 </form></div>
171                 <!-- /TMPL_IF -->
172 <!-- /TMPL_IF -->
173
174 <!-- TMPL_IF NAME="delete_confirmed" -->
175 <h3>Currency Deleted</h3>
176 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
177                 <input type="submit" value="OK" />
178         </form>
179 <!-- /TMPL_IF -->
180
181 <!-- TMPL_IF NAME="else" -->
182
183 <h2>Currencies and Exchange Rates</h2>
184         <!-- TMPL_IF NAME="searchfield" -->
185                 You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
186         <!-- /TMPL_IF -->       
187
188         <table>
189                 <tr>
190                         <th>Currency</th>
191                         <th>Rate</th>
192                         <th colspan="2">&nbsp;</th>
193                 </tr>
194                 <!-- TMPL_LOOP NAME="loop" -->
195                 <tr>
196                         <td><!-- TMPL_VAR NAME="currency" --></td>
197                         <td><!-- TMPL_VAR NAME="rate" --></td>
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         
204         <!-- TMPL_IF NAME="offsetgtzero" -->
205                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
206         <!-- /TMPL_IF -->
207
208
209         <!-- TMPL_IF NAME="ltcount" -->
210                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
211         <!-- /TMPL_iF -->
212
213 <!-- /TMPL_IF -->
214
215
216 </div>
217 </div>
218 <div class="yui-b">
219 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
220 </div>
221 </div>
222 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->