Bug 23863: (QA follow-up) Add missing html filter
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketheader.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Branches %]
4 [% USE Koha %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Acquisitions &rsaquo;
8 [% IF ( add_form ) %]
9     [% IF ( basketno ) %]Edit basket '[% basketname | html %]'
10         [% ELSE %]Add a basket to [% booksellername | html %]
11     [% END %]
12 [% END %]
13 </title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 </head>
16
17 <body id="acq_basketheader" class="acq">
18 [% INCLUDE 'header.inc' %]
19 [% INCLUDE 'acquisitions-search.inc' %]
20
21 <div id="breadcrumbs">
22     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
23     <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
24     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a> &rsaquo;
25     [% IF ( add_form ) %]
26         [% IF ( basketno ) %]Edit basket '[% basketname | html %]'
27         [% ELSE %]Add a basket to [% booksellername | html %]
28         [% END %]
29     [% END %]
30 </div>
31
32 <div class="main container-fluid">
33     <div class="row">
34         <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
35
36     [% IF ( add_form ) %]
37         [% IF ( basketno ) %]
38             <h1>Edit basket [% basketname | html %]</h1>
39         [% ELSE %]<h1>Add a basket to [% booksellername | html %]</h1>
40         [% END %]
41     <form name="Aform" action="[% script_name | html %]" method="post" class="validated">
42         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
43         <fieldset class="rows">
44             <ol>
45                 [% IF ( basketno ) %]
46                     <li>
47                         <input type="hidden" name="basketno" value="[% basketno | html %]" />
48                         <input type="hidden" name="is_an_edit" value="1" />
49                     </li>
50                 [% END %]
51                 <li>
52                     <label for="basketname" class="required">Basket name: </label>
53                     <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname | html %]" required="required" class="required" />
54                     <span class="required">Required</span>
55                 </li>
56                 <li>
57                     <label for="billingplace">Billing place: </label>
58                     <select name="billingplace" id="billingplace">
59                         <option value="">--</option>
60                         [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
61                     </select>
62                 </li>
63                 <li>
64                     <label for="deliveryplace">Delivery place: </label>
65                     <select name="deliveryplace" id="deliveryplace">
66                         <option value="">--</option>
67                         [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
68                     </select>
69                 </li>
70                 <li>
71                     <label for="basketbooksellerid">Vendor: </label>
72                     <select name="basketbooksellerid" id="basketbooksellerid">
73                     [% FOREACH b IN booksellers %]
74                         [% IF booksellerid == b.id %]
75                            <option value="[% b.id | html %]" selected="selected">[% b.name | html %]</option>
76                         [% ELSE %]
77                            <option value="[% b.id | html %]">[% b.name | html %]</option>
78                         [% END %]
79                     [% END %]
80             </select>
81                 </li>
82                 <li>
83                     <label for="basketnote">Internal note: </label>
84                     <textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote |html %]</textarea>
85                 </li>
86                 <li>
87                     <label for="basketbooksellernote">Vendor note: </label>
88                     <textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote |html %]</textarea>
89                 </li>
90                 [% IF ( contractloop ) %]
91                     <li><label for="basketcontractnumber">Contract: </label>
92                         <select id="basketcontractnumber" name="basketcontractnumber">
93                             <option value=""></option>
94                             [% FOREACH contractloo IN contractloop %]
95                                 [% IF ( contractloo.selected ) %]
96                                     <option value="[% contractloo.contractnumber | html %]" selected="selected">[% contractloo.contractname | html %]</option>
97                                 [% ELSE %]
98                                      <option value="[% contractloo.contractnumber | html %]">[% contractloo.contractname | html %]</option>
99                                 [% END %]
100                             [% END %]
101                         </select>
102                     </li>
103                 [% END %]
104                 <li>
105                     <label for="is_standing">Orders are standing:</label>
106                     [% IF is_standing %]
107                         <input type="checkbox" id="is_standing" name="is_standing" checked="checked" />
108                     [% ELSE %]
109                         <input type="checkbox" id="is_standing" name="is_standing"/>
110                     [% END %]
111                     <div class="hint">Standing orders do not close when received.</div>
112                 </li>
113                 [% IF basketno %]
114                     <input type="hidden" name="create_items" value="[% create_items | html %]" />
115                 [% ELSE %]
116                  <li>
117                     <label for="create_items">Create items when:</label>
118                     <select name="create_items" id="create_items">
119                         [% SWITCH Koha.Preference('AcqCreateItem') %]
120                             [% CASE 'receiving' %]<option value="">use default (receiving an order)</option>
121                             [% CASE 'cataloguing' %]<option value="">use default (cataloging the record)</option>
122                             [% CASE %]<option value="">use default (placing an order)</option>
123                         [% END %]
124                         <option value="ordering">placing an order</option>
125                         <option value="receiving">receiving an order</option>
126                         <option value="cataloguing">cataloging the record</option>
127                     </select>
128                 </li>
129                 [% END %]
130             </ol>
131         </fieldset>
132
133         [% IF available_additional_fields %]
134             [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %]
135         [% END %]
136
137         <fieldset class="action">
138             <input type="hidden" name="op" value="add_validate" />
139             <input type="submit" value="Save" />
140             [% IF ( basketno ) %]
141                 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
142             [% ELSE %]
143                 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">Cancel</a>
144             [% END %]
145         </fieldset>
146     </form>
147     [% END %]
148 </div>
149 </div>
150
151 [% MACRO jsinclude BLOCK %]
152     [% Asset.js("js/acquisitions-menu.js") | $raw %]
153     [% Asset.js("js/acq.js") | $raw %]
154 [% END %]
155
156 [% INCLUDE 'intranet-bottom.inc' %]