Applying standard dialog styles to confirmation messages
[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 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_IF name="else" -->
75 <div id="toolbar">
76         <script type="text/javascript">
77         //<![CDATA[
78
79         // prepare DOM for YUI Toolbar
80
81          $(document).ready(function() {
82             yuiToolbar();
83          });
84
85         // YUI Toolbar Functions
86
87         function yuiToolbar() {
88             new YAHOO.widget.Button("newfund");
89         }
90
91         //]]>
92         </script>
93         <ul class="toolbar">
94         <li><a id="newfund" href="/cgi-bin/koha/admin/aqbookfund.pl?op=add_form">New Fund</a></li>
95 </ul></div>
96 <!-- /TMPL_IF -->
97
98 <!-- TMPL_IF name="else" -->
99 <h1>Funds and budgets administration</h1>
100   <!-- TMPL_IF NAME="bookfund" -->
101 <form action="aqbudget.pl" method="post">
102 <table>
103   <tr>
104     <th>Code</th>
105     <th>Name</th>
106     <th>Branch</th>
107     <th colspan="3">Actions</th>
108   </tr>
109
110     <!-- TMPL_LOOP name="bookfund" -->
111       <!-- TMPL_IF NAME="toggle" -->
112   <tr class="highlight">
113       <!-- TMPL_ELSE -->
114   <tr>
115       <!-- /TMPL_IF -->
116     <td>
117       <!-- TMPL_VAR name="bookfundid" -->
118     </td>
119     <td>
120       <!-- TMPL_VAR name="bookfundname" -->
121     </td>
122     <td>
123       <!-- TMPL_IF NAME="branchname" -->
124       <!-- TMPL_VAR name="branchname" -->
125       <!-- TMPL_ELSE -->
126       <!-- /TMPL_IF -->
127     </td>
128     <td>
129       <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>
130       <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>
131       <a href="aqbudget.pl?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Add budget</a>
132       <!-- TMPL_IF NAME="has_budgets" -->
133       <a href="aqbudget.pl?filter_bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Show budgets</a>
134       <!-- /TMPL_IF -->
135     </td>
136   </tr>
137
138     <!-- /TMPL_LOOP --> <!-- bookfund -->
139 </table>
140 </form>
141
142 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
143   <!-- /TMPL_IF --> <!-- bookfund -->
144
145 <p>
146   <a href="aqbudget.pl">Show all budgets</a>
147 </p>
148
149 <!-- /TMPL_IF --> <!-- else -->
150
151 <!-- TMPL_IF name="add_form" -->
152 <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
153
154
155 <!-- TMPL_IF name="header-is-modify-p" -->
156   <input type="hidden" name="op" value="mod_validate" />
157   <input type="hidden" name="current_branch" value="<!-- TMPL_VAR name="current_branch" -->"/>
158   <!-- /TMPL_IF -->
159
160 <!-- TMPL_IF name="header-is-add-p" -->
161   <input type="hidden" name="op" value="add_validate" />
162   <!-- /TMPL_IF -->
163
164
165   <input type="hidden" name="checked" value="0" />
166
167   <fieldset class="rows">
168     <legend><!-- TMPL_VAR name="header" --></legend>
169     
170   <ol><!-- TMPL_IF name="add_or_modify" -->
171     <li>
172         <span class="label">Fund: </span>
173         <input type="hidden" name="bookfundid" id="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
174         <!-- TMPL_VAR name="bookfundid" -->
175     </li>
176   <!-- TMPL_ELSE -->
177     <li>
178       <label for="bookfundid">Fund: </label>
179       <input type="text" name="bookfundid" id="bookfundid" size="5" maxlength="5" onblur="toUC(this)" />
180     </li>
181   <!-- /TMPL_IF --> <!-- add_or_modify -->
182     
183     <li>
184       <label for="bookfundname">Name: </label>
185           <input type="text" name="bookfundname" id="bookfundname" size="40" maxlength="80" value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->" />
186       </li>
187
188     <li>
189       <label for="branchcode">Library: </label>
190       <select name="branchcode" id="branchcode">
191           <option value="">----</option>
192   <!-- TMPL_LOOP NAME="branches" -->
193     <!-- TMPL_IF NAME="selected" -->
194           <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
195     <!-- TMPL_ELSE -->
196           <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
197     <!-- /TMPL_IF -->
198   <!-- /TMPL_LOOP -->
199         </select>
200     </li></ol>
201     
202   </fieldset>
203
204   <fieldset class="action">
205     <input type="button" value="Submit" onclick="Check(this.form); return false;" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbookfund.pl">Cancel</a>
206   </fieldset>
207 </form>
208 <!-- /TMPL_IF --> <!-- add_form -->
209
210
211 <!-- TMPL_IF name="add_validate" -->
212 <h3>Fund added</h3>
213
214 <p>
215   <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
216 </p>
217 <!-- /TMPL_IF -->
218
219
220 <!-- TMPL_IF name="mod_validate" -->
221 <h3>Fund modified</h3>
222
223 <p>
224   <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
225 </p>
226 <!-- /TMPL_IF -->
227
228
229
230 <!-- TMPL_IF name="delete_confirm" -->
231
232 <div class="dialog alert">
233 <h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
234 <form action="<!-- TMPL_VAR name="action" -->" method="post">
235   <input type="hidden" name="op" value="delete_confirmed" />
236   <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
237   <input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" -->" />
238         <table>
239                   <tr>
240     <th scope="row">Fund: </th><td>
241     <!-- TMPL_VAR name="bookfundid" --></td></tr>
242   
243   <tr>
244     <th scope="row">Branch: </th><td>
245     <!-- TMPL_VAR name="branchcode" --></td></tr>
246   
247   <tr>
248     <th scope="row">Name: </th><td>
249     <!-- TMPL_VAR name="bookfundname" --></td></tr>
250   
251   <tr>
252     <th scope="row">Group: </th><td>
253     <!-- TMPL_VAR name="bookfundgroup" --></td></tr>
254         </table>
255    <input type="submit" class="approve" value="Yes, Delete this Fund" /></form>
256    <form action="/cgi-bin/koha/admin/aqbookfund.pl" method="get"><input type="submit" class="deny" value="No, Do not Delete" /></form>
257    </div>
258
259 <!-- /TMPL_IF --> <!-- delete_confirm -->
260
261 <!-- TMPL_IF name="delete_confirmed" -->
262 <div class="dialog message"><h3>Data Deleted</h3>
263 <form action="<!-- TMPL_VAR name="action" -->" method="post">
264   <input type="submit" class="approve" value="OK" />
265 </form></div>
266 <!-- /TMPL_IF --> <!-- delete_confirmed -->
267
268 </div>
269 </div>
270 <div class="yui-b">
271 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
272 </div>
273 </div>
274 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->