More fixes for Bug 2600, HTML tags in titles not escaped in many places
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderempty.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Acquisitions &rsaquo; Shopping Basket <!-- TMPL_VAR NAME="basketno" --> &rsaquo; <!-- TMPL_IF name="ordernumber" -->Modify order details (line #<!-- TMPL_VAR NAME="ordernumber" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
6 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/additem.js"></script>
7 <script type="text/javascript">
8 //<![CDATA[
9 actTotal = "";
10
11 function Check(ff) {
12     var ok=0;
13     var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
14
15     _alertString +="-------------------------------------------------------------------\n\n";
16
17     if ( isNull(ff.title,1)  &&  isNull(ff.entertitle,1)   ){
18         ok=1;
19                     _alertString += "\n- " + _("Title cannot be empty");
20     }
21
22     if (!(isNum(ff.quantity,0))){
23         ok=1;
24                     _alertString += "\n- " + _("Quanity must be greater than '0'");
25     }
26
27     if (!(isNum(ff.listprice,0))){
28         ok=1;
29                     _alertString += "\n- " + _("Vendor price must be a number");
30     }
31
32     if (!(isNum(ff.total,0))){
33         ok=1;
34                     _alertString += "\n- " + _("Total must be a number");
35     }
36
37     if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
38         ok=1;
39         _alertString += "\n- " + "Order total (" + ff.total.value + ") exceeds budget available ("+actTotal+")";
40     }
41
42 if (ok) {
43         alert(_alertString);
44     return false;
45     }
46
47 ff.submit();
48
49 }
50
51
52 //]]>
53 </script>
54 </head>
55 <body onload="calcNeworderTotal()">
56
57 <!-- TMPL_INCLUDE NAME="header.inc" -->
58 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
59
60 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Shopping Basket <!-- TMPL_VAR NAME="basketno" --></a> &rsaquo; <!-- TMPL_IF name="ordernumber" -->Modify order details (line #<!-- TMPL_VAR NAME="ordernumber" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --></div>
61
62 <div id="doc3" class="yui-t2">
63
64 <div id="bd">
65     <div id="yui-main">
66     <div class="yui-b">
67
68 <h2>
69     <!-- TMPL_IF name="ordernumber" -->
70         Modify order details (line #<!-- TMPL_VAR NAME="ordernumber" -->)
71     <!-- TMPL_ELSE -->
72         New order
73     <!-- /TMPL_IF -->
74         <!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
75 </h2>
76
77 <!-- TMPL_IF name="basketno" -->
78     <div id="acqui_basket_summary"  class="yui-g">
79         <fieldset class="rows">
80         <legend>Basket details</legend>
81                 <ol>
82         <!-- TMPL_IF NAME="basketnote" --><li><span class="label">Internal note:</span> <!-- TMPL_VAR NAME="basketnote" --></li><!-- /TMPL_IF -->
83         <!-- TMPL_IF NAME="basketbooksellernote" --><li><span class="label">Vendor note</span>: <!-- TMPL_VAR NAME="basketbooksellernote" --></li><!-- /TMPL_IF -->
84         <!-- TMPL_IF NAME="basketcontractno" -->
85             <li><span class="label">Contract number: </span><!-- TMPL_VAR NAME="basketcontractno" --></li>
86             <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=<!-- TMPL_VAR NAME="basketcontractno" -->"><!-- TMPL_VAR NAME="basketcontractname" --></a></li>
87         <!-- /TMPL_IF -->
88         <!-- TMPL_IF NAME="authorisedbyname" --><li><span class="label">Managed by:</span>  <!-- TMPL_VAR NAME="authorisedbyname" --></li><!-- /TMPL_IF -->
89         <!-- TMPL_IF NAME="creationdate" --><li><span class="label">Open on:</span>  <!-- TMPL_VAR NAME="creationdate" --></li><!-- /TMPL_IF -->
90         <!-- TMPL_IF name="closedate" -->
91         <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
92         <li><span class="label">Closed on:</span>  <!-- TMPL_VAR name="closedate" --></li>
93         <!-- TMPL_IF name="basketgroups" -->
94             <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
95                 <!-- TMPL_LOOP name="basketgroups" -->
96                     <!-- TMPL_IF name="default" -->
97                     <option value="<!-- TMPL_VAR name="id" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
98                     <!-- TMPL_ELSE -->
99                     <option value="<!-- TMPL_VAR name="id" -->"><!-- TMPL_VAR name="name" --></option>
100                     <!-- /TMPL_IF -->
101                 <!-- /TMPL_LOOP -->
102                 </select>
103                 <input type="hidden" id="basketno" value="<!-- TMPL_VAR name="basketno" -->" name="basketno" />
104                 <input type="hidden" value="mod_basket" name="op" />
105                 <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR name="booksellerid" -->" />
106             </li>
107                 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
108         </form>
109         <!-- /TMPL_IF -->
110         <!-- /TMPL_IF -->
111                         </ol>
112 </fieldset>
113     </div>
114 <!-- /TMPL_IF -->
115
116 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" id="Aform">
117
118 <fieldset class="rows">
119         <legend>Catalog details</legend>
120         <!-- TMPL_UNLESS name="existing" -->
121         <input type="hidden" name="existing" value="no" />
122         <!-- /TMPL_UNLESS -->
123         <input type="hidden" name="ordernumber" value="<!-- TMPL_VAR NAME="ordernumber" -->" />
124         <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
125         <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
126         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
127         <input type="hidden" name="biblioitemnumber" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
128         <input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" />
129         <input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
130         <input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
131         <input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
132         <input type="hidden" name="invoiceincgst" value="<!-- TMPL_VAR NAME="invoiceincgst" -->" />
133         <input type="hidden" name="gstrate" value="<!-- TMPL_VAR NAME="gstrate" -->" />
134         <input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
135         <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
136
137         <!-- TMPL_LOOP NAME="loop_currencies" -->
138             <input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
139         <!-- /TMPL_LOOP -->
140         <ol><li>
141             <!-- TMPL_IF name="biblionumber" -->
142             <span class="label">Title</span>
143                 <input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" ESCAPE="HTML" -->" /> <span class="title"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></span>
144             <!-- TMPL_ELSE -->
145             <label for="entertitle" class="required">Title: </label>
146                 <input type="text" id="entertitle" size="20" name="title" value="<!-- TMPL_VAR NAME="title" ESCAPE="html" -->" />
147             <!-- /TMPL_IF -->
148         </li>
149         <li>
150             <!-- TMPL_IF name="biblionumber" -->
151             <span class="label">Author: </span>
152                 <input type="hidden" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
153             <!-- TMPL_ELSE -->
154             <label for="author">Author: </label>
155                 <input type="text" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" />
156             <!-- /TMPL_IF -->
157         </li>
158         <li>
159             <!-- TMPL_IF name="biblionumber" -->
160             <span class="label">Publisher: </span>
161                 <input type="hidden" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
162             <!-- TMPL_ELSE -->
163             <label for="publishercode"> Publisher: </label>
164                 <input type="text" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" />
165             <!-- /TMPL_IF -->
166         </li>
167         <li>
168             <!-- TMPL_IF name="biblionumber" -->
169             <span class="label">Publication year: </span>
170                 <input type="hidden" size="20" name="publicationyear" id="publicationyear" value="<!-- TMPL_VAR NAME="publicationyear" -->" /><!-- TMPL_VAR NAME="publicationyear" -->
171             <!-- TMPL_ELSE -->
172             <label for="publicationyear">Publication year: </label>
173                 <input type="text" size="20" name="publicationyear" id="publicationyear" value="<!-- TMPL_VAR NAME="publicationyear" -->" />
174             <!-- /TMPL_IF -->
175         </li>
176         <li>
177             <!-- TMPL_IF name="biblionumber" -->
178             <span class="label">ISBN: </span>
179                 <input type="hidden" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
180             <!-- TMPL_ELSE -->
181             <label for="ISBN">ISBN: </label>
182                 <input type="text" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" />
183             <!-- /TMPL_IF -->
184         </li>
185         <li>
186             <!-- TMPL_IF name="biblionumber" -->
187             <span class="label">Series: </span>
188                 <input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><span class="title"><!-- TMPL_VAR NAME="seriestitle" --></span>
189             <!-- TMPL_ELSE -->
190             <label for="series">Series: </label>
191                 <input type="text" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" />
192             <!-- /TMPL_IF -->
193         </li>
194         </ol>
195     </fieldset>
196     <!-- TMPL_IF name="items" -->
197     <fieldset class="rows">
198         <legend>Item</legend>
199         <!-- TMPL_IF name="NoACQframework" -->
200             <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
201         <!-- /TMPL_IF -->
202
203         <!-- TMPL_LOOP NAME="items" -->
204         <div id="outeritemblock">
205         <div id="itemblock">
206             <ol><!-- TMPL_LOOP NAME="iteminformation" --><li>
207                 <div class="subfield_line" style="<!-- TMPL_VAR NAME='hidden' -->;" id="subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
208
209                     <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
210                     <!-- TMPL_VAR NAME="marc_value" -->
211                     <input type="hidden" name="itemid" value="1" />
212                     <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
213                     <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
214                     <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
215                     <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
216                     <!-- TMPL_IF NAME="ITEM_SUBFIELDS_ARE_NOT_REPEATABLE" -->
217                         <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
218                     <!-- /TMPL_IF -->
219
220                 </div></li>
221             <!-- /TMPL_LOOP-->
222             </ol>
223             <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock<!-- TMPL_VAR name="itemBlockIndex" -->')">+</a>
224             <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock<!-- TMPL_VAR name="itemBlockIndex" -->')">-</a>
225         </div><!-- /iteminformation -->
226         </div>
227
228         <!--/TMPL_LOOP--> <!-- /items -->
229     </fieldset>
230     <!-- /TMPL_IF --> <!-- items -->
231     <fieldset class="rows">
232         <legend>Accounting Details</legend>
233         <ol>
234             <li>
235                 <!-- TMPL_IF name="close" -->
236             <span class="label required">Quantity: </span>
237                     <input type="hidden" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" /><!-- TMPL_VAR NAME="quantity" -->
238                 <!-- TMPL_ELSE -->
239                 <label class="required" for="quantity">Quantity: </label>
240                     <!-- TMPL_IF name="items" -->
241                         <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" onchange="calcNeworderTotal();" />
242                     <!-- TMPL_ELSE -->
243                         <input type="text" size="20" id="quantityrec" name="quantity" value="<!-- TMPL_VAR name="quantityrec" -->" onchange="calcNeworderTotal();" />
244                     <!-- /TMPL_IF -->
245                 <!--/TMPL_IF-->
246                 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
247                 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
248             </li>
249             <li>
250                 <!-- TMPL_IF name="close" -->
251             <span class="label">Budget: </span>
252                     <input type="hidden" size="20" name="budget_id" id="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" /><!-- TMPL_VAR NAME="Budget_name" -->
253                 <!-- TMPL_ELSE -->
254                 <label for="budget_id">Budget: </label>
255                     <!-- TMPL_VAR NAME="budget_dropbox" -->
256                 <!--/TMPL_IF-->
257             </li>
258             <li>
259                 <!-- TMPL_IF name="close" -->
260             <span class="label">Vendor price: </span>
261                     <input type="hidden" size="20" name="listprice" id="listprice" value="<!-- TMPL_VAR NAME="listprice" -->" /><!-- TMPL_VAR NAME="listprice" -->
262                 <!-- TMPL_ELSE -->
263                 <label for="listprice">Vendor price: </label>
264                     <input type="text" size="20" name="listprice" id="listprice" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="calcNeworderTotal()" /> (entered as <!-- TMPL_VAR NAME="currency" -->)
265
266                 <!--/TMPL_IF-->
267             </li>
268             <!-- TMPL_UNLESS NAME="close" -->
269             <li>
270                     <label for="uncertainprice">Uncertain price: </label>
271                     <!--TMPL_IF NAME="uncertainprice" -->
272                     <input type="checkbox" name="uncertainprice"  id="uncertainprice" value="1" checked="checked" />
273                     <!-- TMPL_ELSE -->
274                     <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
275                 <!--/TMPL_IF-->
276             </li>
277             <!-- /TMPL_UNLESS -->
278                         <li>
279                 <!-- TMPL_IF name="close" -->
280             <span class="label">Replacement cost: </span>
281                     <input type="hidden" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /><!-- TMPL_VAR NAME="rrp" -->
282                 <!-- TMPL_ELSE -->
283                 <label for="rrp">Replacement cost: </label>
284                     <input type="text" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /> (adjusted for <!-- TMPL_VAR NAME="cur_active" -->)
285                 <!--/TMPL_IF-->
286             </li>
287             <li>
288                 <!-- TMPL_IF name="close" -->
289             <label for="ecost">Budgeted cost: </label>
290                     <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" readonly="readonly"  />
291                 <!-- TMPL_ELSE -->
292                 <label for="ecost">Budgeted cost: </label>
293                     <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" />
294                 <!--/TMPL_IF-->
295                 <!-- TMPL_IF name="discount_2dp" -->  (adjusted for <!-- TMPL_VAR name="discount_2dp" -->% discount)  <!--/TMPL_IF-->
296
297             </li>
298             <!-- TMPL_IF NAME="GST"-->
299             <li>
300                 <!-- TMPL_IF name="close" -->
301             <label for="GST">Budgeted GST: </label>
302                 <input type="text" id="" size="20" name="gst" value="" id="GST" readonly="readonly" />
303                 <!-- TMPL_ELSE -->
304                 <label for="GST">Budgeted GST: </label>
305                 <input type="text" size="20" name="gst" id="GST" value="" />
306                 <!--/TMPL_IF-->
307             </li>
308             <!-- /TMPL_IF -->
309             <li>
310                 <!-- TMPL_IF name="close" -->
311             <label for="total">Total: </label>
312                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" readonly="readonly" />
313                 <!-- TMPL_ELSE -->
314                 <label for="total">Total: </label>
315                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" /> (budgeted cost * quantity)
316                 <!--/TMPL_IF-->
317             </li>
318             <li>
319                 <!-- TMPL_IF name="close" -->
320             <label for="cost">Actual cost: </label>
321                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" readonly="readonly" />
322                 <!-- TMPL_ELSE -->
323                 <label for="cost">Actual cost: </label>
324                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" />
325                 <!--/TMPL_IF-->
326             </li>
327             <li>
328                 <label for="notes">Notes: </label>
329                 <textarea id="notes" cols="30" rows="3" name="notes"><!-- TMPL_VAR NAME="notes" --></textarea>
330             </li>
331             <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
332                 <label for="sort1">Planning value1: </label>
333
334                 <!-- TMPL_IF Name="CGIsort1" -->
335                     <!-- TMPL_VAR Name="CGIsort1" -->
336                 <!-- TMPL_ELSE -->
337
338                     <input type="text" id="sort1" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
339                 <!--/TMPL_IF -->
340             </li>
341             <li>
342                 <label for="sort2">Planning value2: </label>
343
344                 <!-- TMPL_IF Name="CGIsort2" -->
345                     <!-- TMPL_VAR Name="CGIsort2" -->
346                 <!-- TMPL_ELSE -->
347                     <input type="text" id="sort2" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
348                 <!--/TMPL_IF -->
349             </li>
350 </ol>
351     </fieldset>
352     <fieldset class="action">
353         <input type="button" value="Save" onclick="Check(this.form)" /> <!-- TMPL_IF name="suggestionid" --><a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a><!-- TMPL_ELSE --><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a><!-- /TMPL_IF -->
354     </fieldset>
355 </form>
356 </div>
357 </div>
358 <div class="yui-b">
359 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
360 </div>
361 </div>
362 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->