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