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