Add and change preferences, change tab names in sysprefs editor
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudget.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->Budgets &rsaquo; <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" -->Budgets &rsaquo; Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Budgets &rsaquo; Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" -->Budgets &rsaquo; Delete Budget?<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <!-- TMPL_IF name="add_form" -->
6 <script type="text/javascript">
7 //<![CDATA[
8         //
9         function isNotNull(f,noalert) {
10                 if (f.value.length ==0) {
11    return false;
12                 }
13                 return true;
14         }
15         //
16         function toUC(f) {
17                 var x=f.value.toUpperCase();
18                 f.value=x;
19                 return true;
20         }
21         //
22         function isNum(v,maybenull) {
23         var n = new Number(v.value);
24         if (isNaN(n)) {
25                 return false;
26                 }
27         if (maybenull==0 && v.value=='') {
28                 return false;
29         }
30         return true;
31         }
32         //
33         function isDate(f) {
34                 var t = Date.parse(f.value);
35                 if (isNaN(t)) {
36                         return false;
37                 }
38         }
39         //
40         function Check(f) {
41                 var ok=1;
42                 var _alertString="";
43                 var alertString2;
44                 if (f.bookfundid.value.length==0) {
45                         _alertString += "- bookfundid missing\n";
46                 }
47                 if (!(isNotNull(window.document.Aform.budgetamount,1))) {
48                         _alertString += "- Budget missing\n";
49                 }
50                 if (_alertString.length==0) {
51                         document.Aform.submit();
52                 } else {
53                         alertString2 = "Form not submitted because of the following problem(s)\n";
54                         alertString2 += "------------------------------------------------------------------------------------\n\n";
55                         alertString2 += _alertString;
56                         alert(alertString2);
57                 }
58         }
59 //]]>
60 </script>
61 <!-- /TMPL_IF -->
62 </head>
63 <body>
64 <!-- TMPL_INCLUDE NAME="header.inc" -->
65 <!-- TMPL_INCLUDE NAME="bookfund-admin-search.inc" -->
66
67 <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; <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Delete Budget?<!-- /TMPL_IF --></div>
68
69 <div id="doc3" class="yui-t2">
70    
71    <div id="bd">
72         <div id="yui-main">
73         <div class="yui-b">
74
75
76 <!-- TMPL_IF NAME="add_validate" -->
77   <div class="dialog message">
78   <h3>Budget Data Recorded</h3>
79   <form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="submit" class="approve" value="OK" /></form></div>
80 <!-- /TMPL_IF --> <!-- add_validate -->
81
82 <!-- TMPL_IF name="delete_confirmed" -->
83   <div class="dialog message"><h3>Budget deleted</h3>
84   <form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="submit" class="approve" value="OK" /></form></div>
85 <!-- /TMPL_IF --> <!-- delete_confirmed -->
86
87
88 <!-- TMPL_IF name="else" -->
89 <h1>Budgets</h1>
90 <form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
91 <fieldset class="rows"><legend>Search Budgets</legend><ol>
92     <li><label for="filter_bookfundid"> Fund:</label>
93       <select name="filter_bookfundid" id="filter_bookfundid">
94         <option value="">----</option>
95     <!-- TMPL_LOOP name="filter_bookfundids" -->
96       <!-- TMPL_IF NAME="selected" -->
97         <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
98       <!-- TMPL_ELSE -->
99         <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
100       <!-- /TMPL_IF -->
101     <!-- /TMPL_LOOP -->
102       </select>
103     </li>
104     <li><label for="filter_branchcode">Library:</label>
105       <select name="filter_branchcode" id="filter_branchcode">
106         <option value="">----</option>
107     <!-- TMPL_LOOP name="filter_branches" -->
108       <!-- TMPL_IF NAME="selected" -->
109         <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
110       <!-- TMPL_ELSE -->
111         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
112       <!-- /TMPL_IF -->
113     <!-- /TMPL_LOOP -->
114       </select>
115     </li>
116     <li><label for="filter_startdate_sign"> Start date:</label>
117       <select name="filter_startdate_sign" id="filter_startdate_sign">
118     <!-- TMPL_IF NAME="filter_startdate_sign_equal_selected" -->
119         <option value="=" selected="selected">=</option>
120     <!-- TMPL_ELSE -->
121         <option value="=">=</option>
122     <!-- /TMPL_IF -->
123
124     <!-- TMPL_IF NAME="filter_startdate_sign_superior_selected" -->
125         <option value="&gt;=" selected="selected">&gt;=</option>
126     <!-- TMPL_ELSE -->
127         <option value="&gt;=">&gt;=</option>
128     <!-- /TMPL_IF -->
129
130     <!-- TMPL_IF NAME="filter_startdate_sign_inferior_selected" -->
131         <option value="&lt;=" selected="selected">&lt;=</option>
132     <!-- TMPL_ELSE -->
133         <option value="&lt;=">&lt;=</option>
134     <!-- /TMPL_IF -->
135       </select>
136       <input type="text" size="10" id="filter_startdate" name="filter_startdate" value="<!-- TMPL_VAR Name="filter_startdate" -->" />
137       <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_startdate_button" alt="Show Calendar" />
138       <script type="text/javascript">
139 //<![CDATA[
140         Calendar.setup(
141           {
142             inputField : "filter_startdate",
143             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
144             button : "filter_startdate_button"
145           }
146         );
147       //]]>
148 </script>
149     </li>
150     <li><label for="filter_enddate_sign"> End date:</label>
151       <select name="filter_enddate_sign" id="filter_enddate_sign">
152     <!-- TMPL_IF NAME="filter_enddate_sign_equal_selected" -->
153         <option value="=" selected="selected">=</option>
154     <!-- TMPL_ELSE -->
155         <option value="=">=</option>
156     <!-- /TMPL_IF -->
157
158     <!-- TMPL_IF NAME="filter_enddate_sign_superior_selected" -->
159         <option value="&gt;=" selected="selected">&gt;=</option>
160     <!-- TMPL_ELSE -->
161         <option value="&gt;=">&gt;=</option>
162     <!-- /TMPL_IF -->
163
164     <!-- TMPL_IF NAME="filter_enddate_sign_inferior_selected" -->
165         <option value="&lt;=" selected="selected">&lt;=</option>
166     <!-- TMPL_ELSE -->
167         <option value="&lt;=">&lt;=</option>
168     <!-- /TMPL_IF -->
169       </select>
170       <input type="text" size="10" id="filter_enddate" name="filter_enddate" value="<!-- TMPL_VAR Name="filter_enddate" -->" />
171       <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_enddate_button" alt="Show Calendar" />
172       <script type="text/javascript">
173 //<![CDATA[
174         Calendar.setup(
175           {
176             inputField : "filter_enddate",
177             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
178             button : "filter_enddate_button"
179           }
180         );
181       //]]>
182 </script>
183     </li>
184     <li><label for="filter_amount_sign"> Budget amount:</label>
185       <select name="filter_amount_sign" id="filter_amount_sign">
186     <!-- TMPL_IF NAME="filter_amount_sign_equal_selected" -->
187         <option value="=" selected="selected">=</option>
188     <!-- TMPL_ELSE -->
189         <option value="=">=</option>
190     <!-- /TMPL_IF -->
191
192     <!-- TMPL_IF NAME="filter_amount_sign_superior_selected" -->
193         <option value="&gt;=" selected="selected">&gt;=</option>
194     <!-- TMPL_ELSE -->
195         <option value="&gt;=">&gt;=</option>
196     <!-- /TMPL_IF -->
197
198     <!-- TMPL_IF NAME="filter_amount_sign_inferior_selected" -->
199         <option value="&lt;=" selected="selected">&lt;=</option>
200     <!-- TMPL_ELSE -->
201         <option value="&lt;=">&lt;=</option>
202     <!-- /TMPL_IF -->
203       </select>
204       <input type="text" name="filter_amount" value="<!-- TMPL_VAR NAME="filter_amount" -->" size="8" />
205     </li>
206   </ol></fieldset>
207   <fieldset class="action"><input type="submit" name="filter" value="Search" /></fieldset>
208         </form>
209
210 <table>
211   <tr>
212     <th>Fund</th>
213     <th>Library</th>
214     <th>Start date</th>
215     <th>End date</th>
216     <th>Budget amount</th>
217     <th colspan="2">Actions</th>
218   </tr>
219
220   <!-- TMPL_LOOP name="budget" -->
221     <!-- TMPL_UNLESS name="__odd__" -->
222   <tr class="highlight">
223     <!-- TMPL_ELSE -->
224   <tr>
225     <!-- /TMPL_IF -->
226     <td><!-- TMPL_VAR NAME="bookfundid" --></td>
227     <td><!-- TMPL_VAR NAME="branchname" --></td>
228     <td><!-- TMPL_VAR NAME="startdate" --></td>
229     <td><!-- TMPL_VAR NAME="enddate" --></td>
230     <td><!-- TMPL_VAR NAME="budgetamount" --></td>
231     <td>
232       <a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a></td><td>
233       <a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Delete</a>
234     </td>
235   </tr>
236   <!-- /TMPL_LOOP --> <!-- budget -->
237 </table>
238
239 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
240 <!-- /TMPL_IF --> <!-- else -->
241
242 <!-- TMPL_IF name="add_form" -->
243
244 <form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
245   <fieldset class="rows">
246     <legend><!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> budget</legend>
247     <input type="hidden" name="op" value="add_validate" />
248     <input type="hidden" name="checked" value="0" />
249
250     
251      <ol> <li>
252         <span class="label">Fund: </span>
253         <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" />
254           <!-- TMPL_VAR NAME="bookfundname" -->
255       </li>
256
257       <li>
258           <label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->): </label>
259                         <input type="text" size="8" maxlength="10" id="startdate" name="startdate" value="<!-- TMPL_VAR Name="startdate" -->" />
260           <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="startdate_button" alt="Show Calendar" />
261           <script type="text/javascript">
262 //<![CDATA[
263             Calendar.setup(
264               {
265                 inputField : "startdate",
266                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
267                 button : "startdate_button"
268               }
269             );
270           //]]>
271 </script>
272         
273       </li>
274       <li>
275           <label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->): </label>
276           <input type="text" size="8" maxlength="10" id="enddate" name="enddate" value="<!-- TMPL_VAR Name="enddate" -->" />
277           <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="enddate_button" alt="Show Calendar" />
278           <script type="text/javascript">
279 //<![CDATA[
280             Calendar.setup(
281               {
282                 inputField : "enddate",
283                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
284                 button : "enddate_button"
285               }
286             );
287           //]]>
288 </script>
289         
290       </li>
291       <li>
292           <label for="budgetamount">Budget amount: </label>
293           <input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" size="8" />
294         
295       </li>
296       <li>
297           <label for="branch">Library: </label>
298         
299   <!-- TMPL_IF NAME="disable_branchselection" -->
300           <!-- Pierrick's note: I've found that a disabled select was not -->
301           <!-- giving its value to Perl :-/ So I use a hidden field trick -->
302           <input type="hidden" name="branch" id="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
303           <select name="branch" disabled="disabled">
304   <!-- TMPL_ELSE -->
305           <select name="branch" id="branch">
306   <!-- /TMPL_IF -->
307
308             <option value="">----</option>
309   <!-- TMPL_LOOP NAME="branches" -->
310     <!-- TMPL_IF NAME="selected" -->
311             <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
312     <!-- TMPL_ELSE -->
313             <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
314     <!-- /TMPL_IF -->
315   <!-- /TMPL_LOOP -->
316           </select>
317         
318       </li></ol>
319     
320
321   <!-- TMPL_IF NAME="aqbudgetid" -->
322     <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
323   <!-- /TMPL_IF -->
324
325   </fieldset>
326     <fieldset class="action">
327       <input type="button" value="Submit" onclick="Check(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudget.pl">Cancel</a>
328      </fieldset>
329 </form>
330 <!-- /TMPL_IF --> <!-- add_form -->
331
332 <!-- TMPL_IF name="delete_confirm" -->
333  <div class="dialog alert"> <h3>Delete Budget?</h3>
334
335     <table>
336       <tr>
337         <th scope="row">Start date: </th>
338         <td><!-- TMPL_VAR NAME="startdate" --></td>
339       </tr>
340       
341       <tr>
342         <th scope="row">End date: </th>
343         <td><!-- TMPL_VAR NAME="enddate" --></td>
344       </tr>
345       
346       <tr>
347         <th scope="row">Budget Amount: </th>
348         <td><!-- TMPL_VAR NAME="budgetamount" --></td>
349       </tr>
350     </table>
351
352 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
353 <input type="hidden" name="op" value="delete_confirmed" />
354 <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
355 <input type="submit" value="Delete this budget" class="approve" /></form>
356 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
357 <input type="submit" class="deny" value="No, Do Not Delete" /></form></div>
358
359 <!-- /TMPL_IF -->
360
361 </div>
362 </div>
363 <div class="yui-b">
364 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
365 </div>
366 </div>
367 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->