#1546 REPLACE statements (continued)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbookfund.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Funds and Budgets</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_IF name="add_form" -->
5 <script type="text/javascript">
6 //<![CDATA[
7
8         function isNotNull(f,noalert) {
9                 if (f.value.length ==0) {
10    return false;
11                 }
12                 return true;
13         }
14
15         function toUC(f) {
16                 var x=f.value.toUpperCase();
17                 f.value=x;
18                 return true;
19         }
20
21         function isNum(v,maybenull) {
22         var n = new Number(v.value);
23         if (isNaN(n)) {
24                 return false;
25                 }
26         if (maybenull==0 && v.value=="") {
27                 return false;
28         }
29         return true;
30         }
31
32         function isDate(f) {
33                 var t = Date.parse(f.value);
34                 if (isNaN(t)) {
35                         return false;
36                 }
37         }
38
39         function Check(f) {
40                 var ok=1;
41                 var _alertString="";
42                 var alertString2;
43                 if (f.bookfundid.value.length==0) {
44                         _alertString += "- bookfundid missing\n";
45                 }
46                 if (f.bookfundname.value.length==0) {
47                         _alertString += "- bookfundname missing\n";
48                 }
49                 if (_alertString.length==0) {
50                         document.Aform.submit();
51                 } else {
52                         alertString2 = "Form not submitted because of the following problem(s)\n";
53                         alertString2 += "------------------------------------------------------------------------------------\n\n";
54                         alertString2 += _alertString;
55                         alert(alertString2);
56                 }
57         }
58         //]]>
59 </script>
60 <!-- /TMPL_IF -->
61 </head>
62 <body>
63 <!-- TMPL_INCLUDE NAME="header.inc" -->
64 <!-- TMPL_INCLUDE NAME="bookfund-admin-search.inc" -->
65
66 <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" -->Funds and Budgets  <!-- /TMPL_IF --> <!-- TMPL_IF name="add_form" --><a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds and Budgets</a> &rsaquo; Add book fund<!-- /TMPL_IF --></div>
67
68 <div id="doc3" class="yui-t2">
69    
70    <div id="bd">
71         <div id="yui-main">
72         <div class="yui-b">
73         
74 <!-- TMPL_UNLESS NAME="header-is-add-p" --><!-- TMPL_INCLUDE NAME="bookfund-admin-toolbar.inc" --><!-- /TMPL_UNLESS -->
75
76 <!-- TMPL_IF name="else" -->
77 <h1>Funds and budgets administration</h1>
78   <!-- TMPL_IF NAME="bookfund" -->
79 <form action="aqbudget.pl" method="post">
80 <table>
81   <tr>
82     <th>Code</th>
83     <th>Name</th>
84     <th>Branch</th>
85     <th colspan="3">Actions</th>
86   </tr>
87
88     <!-- TMPL_LOOP name="bookfund" -->
89       <!-- TMPL_IF NAME="toggle" -->
90   <tr class="highlight">
91       <!-- TMPL_ELSE -->
92   <tr>
93       <!-- /TMPL_IF -->
94     <td>
95       <!-- TMPL_VAR name="bookfundid" -->
96     </td>
97     <td>
98       <!-- TMPL_VAR name="bookfundname" -->
99     </td>
100     <td>
101       <!-- TMPL_IF NAME="branchname" -->
102       <!-- TMPL_VAR name="branchname" -->
103       <!-- TMPL_ELSE -->
104       <!-- /TMPL_IF -->
105     </td>
106     <td>
107       <a href="<!-- TMPL_VAR name="scriptname" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Edit</a></td><td>
108       <a href="<!-- TMPL_VAR name="scriptname" -->?op=delete_confirm&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Delete</a></td><td>
109       <a href="aqbudget.pl?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Add budget</a>
110       <!-- TMPL_IF NAME="has_budgets" -->
111       <a href="aqbudget.pl?filter_bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Show budgets</a>
112       <!-- /TMPL_IF -->
113     </td>
114   </tr>
115
116     <!-- /TMPL_LOOP --> <!-- bookfund -->
117 </table>
118 </form>
119
120 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
121   <!-- /TMPL_IF --> <!-- bookfund -->
122
123 <p>
124   <a href="aqbudget.pl">Show all budgets</a>
125 </p>
126
127 <!-- /TMPL_IF --> <!-- else -->
128
129 <!-- TMPL_IF name="add_form" -->
130 <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
131
132
133 <!-- TMPL_IF name="header-is-modify-p" -->
134   <input type="hidden" name="op" value="mod_validate" />
135   <input type="hidden" name="current_branch" value="<!-- TMPL_VAR name="current_branch" -->"
136   <!-- /TMPL_IF -->
137
138 <!-- TMPL_IF name="header-is-add-p" -->
139   <input type="hidden" name="op" value="add_validate" />
140   <!-- /TMPL_IF -->
141
142
143   <input type="hidden" name="checked" value="0" />
144
145   <fieldset class="rows">
146     <legend><!-- TMPL_VAR name="header" --></legend>
147     
148   <ol><!-- TMPL_IF name="add_or_modify" -->
149     <li>
150         <span class="label">Fund: </span>
151         <input type="hidden" name="bookfundid" id="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
152         <!-- TMPL_VAR name="bookfundid" -->
153     </li>
154   <!-- TMPL_ELSE -->
155     <li>
156       <label for="bookfundid">Fund: </label>
157       <input type="text" name="bookfundid" id="bookfundid" size="5" maxlength="5" onblur="toUC(this)" />
158     </li>
159   <!-- /TMPL_IF --> <!-- add_or_modify -->
160     
161     <li>
162       <label for="bookfundname">Name: </label>
163           <input type="text" name="bookfundname" id="bookfundname" size="40" maxlength="80" value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->" />
164       </li>
165
166     <li>
167       <label for="branchcode">Library: </label>
168       <select name="branchcode" id="branchcode">
169           <option value="">----</option>
170   <!-- TMPL_LOOP NAME="branches" -->
171     <!-- TMPL_IF NAME="selected" -->
172           <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
173     <!-- TMPL_ELSE -->
174           <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
175     <!-- /TMPL_IF -->
176   <!-- /TMPL_LOOP -->
177         </select>
178     </li></ol>
179     
180   </fieldset>
181
182   <fieldset class="action">
183     <input type="button" value="Submit" onclick="Check(this.form); return false;" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbookfund.pl">Cancel</a>
184   </fieldset>
185 </form>
186 <!-- /TMPL_IF --> <!-- add_form -->
187
188
189 <!-- TMPL_IF name="add_validate" -->
190 <h3>Bookfund Added</h3>
191
192 <p>
193   <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
194 </p>
195 <!-- /TMPL_IF -->
196
197
198 <!-- TMPL_IF name="mod_validate" -->
199 <h3>Bookfund Modified</h3>
200
201 <p>
202   <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
203 </p>
204 <!-- /TMPL_IF -->
205
206
207
208 <!-- TMPL_IF name="delete_confirm" -->
209 <h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
210 <table>
211   <tr>
212     <th>Fund</th>
213     <td><!-- TMPL_VAR name="bookfundid" --></td>
214   </tr>
215   <tr>
216     <th>Branch</th>
217     <td><!-- TMPL_VAR name="branchcode" --></td>
218   </tr>
219   <tr>
220     <th>Name</th>
221     <td><!-- TMPL_VAR name="bookfundname" --></td>
222   </tr>
223   <tr>
224     <th>Group</th>
225     <td><!-- TMPL_VAR name="bookfundgroup" --></td>
226   </tr>
227 </table>
228
229 <form action="<!-- TMPL_VAR name="action" -->" method="post">
230   <input type="hidden" name="op" value="delete_confirmed" />
231   <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
232   <input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" -->" />
233
234   <div id="action">
235     <input type="submit" value="Delete this Fund" />
236   </div>
237 </form>
238
239 <form action="<!-- TMPL_VAR name="action" -->" method="post">
240   <input type="submit" value="Do not Delete" />
241 </form>
242 <!-- /TMPL_IF --> <!-- delete_confirm -->
243
244 <!-- TMPL_IF name="delete_confirmed" -->
245 <h3>Data Deleted</h3>
246 <form action="<!-- TMPL_VAR name="action" -->" method="post">
247   <input type="submit" value="OK" />
248 </form>
249 <!-- /TMPL_IF --> <!-- delete_confirmed -->
250
251 </div>
252 </div>
253 <div class="yui-b">
254 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
255 </div>
256 </div>
257 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->