6 [% PROCESS 'i18n.inc' %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% FILTER collapse %]
11 [% tx("Edit basket '{basketname}'", { basketname = basketname }) | html %]
13 [% tx("Add basket to {vendor}", { vendor = booksellername }) | html %]
16 [% t("Acquisitions") | html %] ›
17 [% t("Koha") | html %]
19 [% INCLUDE 'doc-head-close.inc' %]
22 <body id="acq_basketheader" class="acq">
23 [% WRAPPER 'header.inc' %]
24 [% INCLUDE 'acquisitions-search.inc' %]
27 [% WRAPPER 'sub-header.inc' %]
28 [% WRAPPER breadcrumbs %]
29 [% WRAPPER breadcrumb_item %]
30 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
32 [% WRAPPER breadcrumb_item %]
33 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
37 [% WRAPPER breadcrumb_item bc_active= 1%]
38 <span>Edit basket '[% basketname | html %]'</span>
41 [% WRAPPER breadcrumb_item bc_active= 1%]
42 <span>Add a basket to [% booksellername | html %]</span>
46 [% END #/ WRAPPER breadcrumbs %]
47 [% END #/ WRAPPER sub-header.inc %]
49 <div class="main container-fluid">
51 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
55 <h1>Edit basket [% basketname | html %]</h1>
56 [% ELSE %]<h1>Add a basket to [% booksellername | html %]</h1>
58 <form name="Aform" action="[% script_name | html %]" method="post" class="validated">
59 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
60 <fieldset class="rows">
64 <input type="hidden" name="basketno" value="[% basketno | html %]" />
65 <input type="hidden" name="is_an_edit" value="1" />
69 <label for="basketname" class="required">Basket name: </label>
70 <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname | html %]" required="required" class="focus required" />
71 <span class="required">Required</span>
74 <label for="billingplace">Billing place: </label>
75 <select name="billingplace" id="billingplace">
76 <option value="">--</option>
77 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
81 <label for="deliveryplace">Delivery place: </label>
82 <select name="deliveryplace" id="deliveryplace">
83 <option value="">--</option>
84 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
88 <label for="basketbooksellerid">Vendor: </label>
89 <select name="basketbooksellerid" id="basketbooksellerid">
90 <option value="[% booksellerid | html %]" selected="selected">Current vendor ([% booksellername | html %])</option>
94 <label for="basketnote">Internal note: </label>
95 <textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote |html %]</textarea>
98 <label for="basketbooksellernote">Vendor note: </label>
99 <textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote |html %]</textarea>
101 [% IF ( contractloop ) %]
102 <li><label for="basketcontractnumber">Contract: </label>
103 <select id="basketcontractnumber" name="basketcontractnumber">
104 <option value=""></option>
105 [% FOREACH contractloo IN contractloop %]
106 [% IF ( contractloo.selected ) %]
107 <option value="[% contractloo.contractnumber | html %]" selected="selected">[% contractloo.contractname | html %]</option>
109 <option value="[% contractloo.contractnumber | html %]">[% contractloo.contractname | html %]</option>
116 <label for="is_standing">Orders are standing:</label>
118 <input type="checkbox" id="is_standing" name="is_standing" checked="checked" />
120 <input type="checkbox" id="is_standing" name="is_standing"/>
122 <div class="hint">Standing orders do not close when received.</div>
125 <input type="hidden" name="create_items" value="[% create_items | html %]" />
128 <label for="create_items">Create items when:</label>
129 <select name="create_items" id="create_items">
130 [% SWITCH Koha.Preference('AcqCreateItem') %]
131 [% CASE 'receiving' %]<option value="">use default (receiving an order)</option>
132 [% CASE 'cataloguing' %]<option value="">use default (cataloging the record)</option>
133 [% CASE %]<option value="">use default (placing an order)</option>
135 <option value="ordering">placing an order</option>
136 <option value="receiving">receiving an order</option>
137 <option value="cataloguing">cataloging the record</option>
144 [% IF available_additional_fields.count %]
145 [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %]
148 <fieldset class="action">
149 <input type="hidden" name="op" value="add_validate" />
150 <input type="submit" class="btn btn-primary" value="Save" />
151 [% IF ( basketno ) %]
152 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
154 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">Cancel</a>
162 [% MACRO jsinclude BLOCK %]
163 [% Asset.js("js/acquisitions-menu.js") | $raw %]
164 [% Asset.js("js/acq.js") | $raw %]
165 [% INCLUDE 'select2.inc' %]
168 $(document).ready(function() {
170 function display_vendor(vendor) {
172 $text = $('<span>'+vendor.text+'</span>');
177 $("#basketbooksellerid").kohaSelect({
181 url: '/api/v1/acquisitions/vendors',
182 delay: 300, // wait 300 milliseconds before triggering the request
185 data: function (params) {
186 var search_term = (params.term === undefined) ? '' : params.term;
188 "q": JSON.stringify({"name":{"-like":'%'+search_term+'%'}}),
195 processResults: function (data) {
197 data.results.forEach( function ( vendor ) {
201 "text": vendor.name.escapeHtml()
205 return { "results": results, "pagination": { "more": data.pagination.more } };
208 templateResult: display_vendor,
209 templateSelection: display_vendor
215 [% INCLUDE 'intranet-bottom.inc' %]