Bug 10737: Add "Add to basket" link on vendor search results page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9
10 <script type="text/javascript">
11 //<![CDATA[
12     function updateColumnsVisibility(visible) {
13         if ( visible ) {
14             $("table .gste, .gsti").show();
15         } else {
16             [% IF ( listincgst ) %]
17                 $("table .gste").hide();
18             [% ELSE %]
19                 $("table .gsti").hide();
20             [% END %]
21         }
22     }
23
24     $(document).ready(function() {
25         $("#show_all_details").click(function(){
26             updateColumnsVisibility($(this+":checked").val());
27         });
28
29         $("#show_all_details").attr('checked', false);
30         updateColumnsVisibility(false);
31         [% UNLESS ( closedate ) %]
32             $('#addtoBasket').on('show', function () {
33                $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
34             });
35         [% END %]
36     });
37 //]]>
38 </script>
39
40 [% UNLESS ( closedate ) %]
41 <script type="text/javascript">
42 //<![CDATA[
43             function confirm_close() {
44                 var is_confirmed = confirm(_("Are you sure you want to close this basket?"));
45                 if (is_confirmed) {
46                     window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
47                 }
48             }
49             function confirm_deletion() {
50                 var is_confirmed = confirm(_("Are you sure you want to delete this basket?"));
51                 if (is_confirmed) {
52                     window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]";
53                 }
54             }
55             function confirm_delete_item(ordernumber, biblionumber) {
56                 var is_confirmed = confirm(_("Are you sure you want to delete this order ?"));
57                 if (is_confirmed) {
58                     window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
59                 }
60             }
61             
62             function confirm_delete_biblio(ordernumber, biblionumber) {
63                 var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?"));
64                 if (is_confirmed) {
65                     window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
66                     }
67             }
68
69 //]]>
70 </script>
71 [% ELSE %]
72 <script type="text/javascript">
73 //<![CDATA[
74     $(document).ready(function(){
75         $("#basketgroupid").change(function(){
76             if($(this).val() == "new"){
77                 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
78             }
79         });
80     });
81 //]]>
82 </script>
83 [% UNLESS ( grouped ) %]
84 <script type="text/javascript">
85 //<![CDATA[
86             function confirm_reopen() {
87                 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
88                 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
89                 if (is_confirmed) {
90                     window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
91                 }
92             }
93 //]]>
94 </script>
95 [% END %]
96 [% END %]
97 <script type="text/javascript">
98 //<![CDATA[
99     $(document).ready(function() {
100         var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
101             "sPaginationType": "four_button",
102             [% IF ( active ) %]
103               [% UNLESS ( closedate ) %]
104                 "aoColumnDefs": [
105                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
106                 ],
107               [% END %]
108             [% END %]
109         } ) );
110         var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
111             "sPaginationType": "four_button"
112         } ) );
113         $("#delbasketbutton").on("click",function(e){
114             e.preventDefault();
115             confirm_deletion();
116         });
117         $("#reopenbutton").on("click",function(e){
118             e.preventDefault();
119             confirm_reopen();
120         });
121     });
122 //]]>
123 </script>
124
125 <style type="text/css">
126 .sortmsg {font-size: 80%;}
127 </style>
128 </head>
129 <body id="acq_basket" class="acq">
130 [% INCLUDE 'header.inc' %]
131 [% INCLUDE 'acquisitions-search.inc' %]
132
133
134 <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/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
135
136 <div id="doc3" class="yui-t2">
137
138 <div id="bd">
139     <div id="yui-main">
140     <div class="yui-b">
141         [% UNLESS ( confirm_close ) %]
142         [% UNLESS ( selectbasketg ) %]
143             [% UNLESS ( closedate ) %]
144                 <div id="toolbar" class="btn-toolbar">
145                     <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div>
146                     <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div>
147                     <div class="btn-group"><a href="#" class="btn btn-small" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div>
148                     [% IF ( unclosable ) %]
149                     [% ELSIF ( uncertainprices ) %]
150                         <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div>
151                     [% ELSE %]
152                         <div class="btn-group">
153                             <a href="[% script_name %]?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="icon-remove-sign"></i> Close this basket</a>
154                         </div>
155                     [% END %]
156                         <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
157
158                 </div>
159             [% ELSE %]
160                 [% UNLESS ( grouped ) %]
161                 <div id="toolbar" class="btn-toolbar">
162                     <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="icon-refresh"></i> Reopen this basket</a></div>
163                     <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
164                 </div>
165                 [% END %]
166             [% END %]
167             [% END %]
168
169     [% IF ( NO_BOOKSELLER ) %]
170     <h2>Vendor not found</h2>
171     [% ELSE %]
172         [% IF ( delete_confirmed ) %]
173             <h3>Basket deleted</h3>
174             <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
175         [% ELSE %]
176         <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
177         [% IF ( delete_confirm ) %]
178             <h2>
179             <span class="yui-button yui-link-button">
180             <em class="first-child">
181                 <a href="[% script_name %]?op=delete_confirm&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
182             </em>
183             </span>
184             <span class="yui-button yui-link-button">
185             <em class="first-child">
186                 <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
187             </em>
188             </span>
189             </h2>
190         [% END %]
191         [% IF ( basketno ) %]
192             <div id="acqui_basket_summary" class="yui-g">
193                 <div class="rows">
194                 <div class="yui-u first">
195                 <ol>
196                 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
197                 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
198                 [% IF ( basketcontractno ) %]
199                     <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
200                 [% END %]
201                 [% IF ( deliveryplace ) %]<li><span class="label">Delivery place:</span> [% deliveryplace %]</li>[% END %]
202                 [% IF ( billingplace ) %]<li><span class="label">Billing place:</span> [% billingplace %]</li>[% END %]
203                 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span>  [% authorisedbyname %]</li>[% END %]
204                 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span>  [% creationdate | $KohaDates %]</li>[% END %]
205                 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
206                 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates  %]</li>[% END %]
207
208                 </ol>
209                 </div>
210                 [% IF ( closedate ) %]
211                 <div class="yui-u">
212                     [% IF ( CAN_user_acquisition_group_manage ) %]
213                     <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
214                     [% END %]
215                         <ol>
216                         <li>
217                           <span class="label">Basket group:</span>
218                           [% IF basketgroup.closed %]
219                             [% basketgroup.name %] (closed)
220                           [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
221                             [%- IF basketgroup.name -%]
222                                 [% basketgroup.name %]
223                             [%- ELSE -%]
224                                 No group
225                             [%- END -%]
226                           [% ELSE %]
227                             <select id="basketgroupid" name="basketgroupid">
228                               <option value="new">Add new group</option>
229                               [% FOREACH bg IN basketgroups %]
230                                 [% IF ( bg.default ) %]
231                                     <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
232                                 [% ELSE %]
233                                   [% UNLESS bg.closed %]
234                                     <option value="[% bg.id %]">[% bg.name %]</option>
235                                   [% ELSE %]
236                                     <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
237                                   [% END %]
238                                 [% END %]
239                               [% END %]
240                             </select>
241                             <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
242                             <input type="hidden" value="mod_basket" name="op" />
243                             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
244                             <input type="submit" value="Change basket group" />
245                           [% END %]
246                         </li>
247                     [% IF ( basketgroup.deliveryplacename ) %]<li><span class="label">Basket group delivery placename:</span> [% basketgroup.deliveryplacename %]</li>[% END %]
248                     [% IF ( basketgroup.billingplacename ) %]<li><span class="label">Basket group billing place:</span> [% basketgroup.billingplacename %]</li>[% END %]
249                         </ol>
250                     [% IF ( CAN_user_acquisition_group_manage ) %]
251                     </form>
252                     [% END %]
253                 </div>
254                 [% END %]
255             </div>
256             </div>
257         [% END %]
258
259         [% UNLESS ( delete_confirm ) %]
260         <div id="acqui_basket_content" class="yui-g">
261         [% IF ( books_loop ) %]
262         <h2>Orders</h2>
263         <label for="show_all_details">
264             <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
265             Show all details
266         </label>
267             <table id="orders">
268                 <thead>
269                     <tr>
270                         <th>Order</th>
271                         <th class="gste">RRP tax exc.</th>
272                         <th class="gste">ecost tax exc.</th>
273                         <th class="gsti">RRP tax inc.</th>
274                         <th class="gsti">ecost tax inc.</th>
275                         <th>Qty.</th>
276                         <th class="gste">Total tax exc. ([% currency %])</th>
277                         <th class="gsti">Total tax inc. ([% currency %])</th>
278                         <th>GST %</th>
279                         <th>GST</th>
280                         <th>Fund</th>
281                         [% IF ( active ) %]
282                             [% UNLESS ( closedate ) %]
283                                 <th>Modify</th>
284                                 <th>Delete</th>
285                             [% END %]
286                         [% END %]
287                     </tr>
288                 </thead>
289                 <tfoot>
290                 [% FOREACH foot_loo IN book_foot_loop %]
291                     <tr>
292                         <th>Total (GST [% foot_loo.gstgsti %])</th>
293                         <th class="gste">&nbsp;</th>
294                         <th class="gste">&nbsp;</th>
295                         <th class="gsti">&nbsp;</th>
296                         <th class="gsti">&nbsp;</th>
297                         <th>[% foot_loo.quantity %]</th>
298                         <th class="gste">[% foot_loo.totalgste %]</th>
299                         <th class="gsti">[% foot_loo.totalgsti %]</th>
300                         <th>&nbsp;</th>
301                         <th>[% foot_loo.gstvalue %]</th>
302                         <th>&nbsp;</th>
303                         [% IF ( active ) %]
304                             [% UNLESS ( closedate ) %]
305                                 <th>&nbsp;</th>
306                                 <th>&nbsp;</th>
307                             [% END %]
308                         [% END %]
309                     </tr>
310                 [% END %]
311                 <tr>
312                     <th>Total ([% currency %])</th>
313                     <th class="gste">&nbsp;</th>
314                     <th class="gste">&nbsp;</th>
315                     <th class="gsti">&nbsp;</th>
316                     <th class="gsti">&nbsp;</th>
317                     <th>[% total_quantity %]</th>
318                     <th class="gste">[% total_gste %]</th>
319                     <th class="gsti">[% total_gsti %]</th>
320                     <th>&nbsp;</th>
321                     <th>[% total_gstvalue %]</th>
322                     <th>&nbsp;</th>
323                     [% IF ( active ) %]
324                         [% UNLESS ( closedate ) %]
325                             <th>&nbsp;</th>
326                             <th>&nbsp;</th>
327                         [% END %]
328                     [% END %]
329                 </tr>
330                 </tfoot>
331                 <tbody>
332                 [% FOREACH books_loo IN books_loop %]
333                     [% IF ( books_loo.order_received ) %]<tr class="disabled">[% ELSE %][% IF ( books_loo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %][% END %]
334                         <td>
335                             <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
336                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
337                                 <br />
338                                 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
339                                 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
340                                 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
341                                 [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
342                                 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
343                                 [% IF ( books_loo.suggestionid ) %]
344                                     <br/>
345                                     Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
346                                     (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&amp;op=show">suggestion #[% books_loo.suggestionid %]</a>)
347                                 [% END %]
348                             </p>
349                                 [% IF ( books_loo.notes ) %]
350                                     <p class="ordernote"><strong>Note: </strong>[% books_loo.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Change note</a>]</p>
351                                 [% ELSE %]
352                                     <p>[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]</p>
353                                 [% END %]
354                         </td>
355                         <td class="number gste [% IF books_loo.rrpgste.search('^0') %]error[% END %]">[% books_loo.rrpgste %]</td>
356                         <td class="number gste [% IF books_loo.ecostgste.search('^0') %]error[% END %]">[% books_loo.ecostgste %]</td>
357                         <td class="number gsti [% IF books_loo.rrpgsti.search('^0') %]error[% END %]">[% books_loo.rrpgsti %]</td>
358                         <td class="number gsti [% IF books_loo.ecostgsti.search('^0') %]error[% END %]">[% books_loo.ecostgsti %]</td>
359                         <td class="number [% IF books_loo.quantity.search('^0') %]error[% END %]">[% books_loo.quantity %]</td>
360                         <td class="number gste [% IF books_loo.totalgste.search('^0') %]error[% END %]">[% books_loo.totalgste %]</td>
361                         <td class="number gsti [% IF books_loo.totalgsti.search('^0') %]error[% END %]">[% books_loo.totalgsti %]</td>
362                         <td class="number [% IF books_loo.gstgsti.search('^0') %]error[% END %]">[% books_loo.gstgsti %]</td>
363                         <td class="number [% IF books_loo.gstvalue.search('^0') %]error[% END %]">[% books_loo.gstvalue %]</td>
364                         <td>[% books_loo.budget_name %]</td>
365                         [% IF ( active ) %]
366                             [% UNLESS ( closedate ) %]
367                             <td>
368                                 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Modify</a>
369                             </td>
370                             <td>
371                             [% IF ( books_loo.left_holds_on_order ) %]
372                             <span class="button" title="Can't delete order, ([% books_loo.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
373                             [% ELSE %]
374                             <a href="javascript:confirm_delete_item([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete order</a><br>
375                             [% END %]
376                             [% IF ( books_loo.can_del_bib ) %]
377                             <a href="javascript:confirm_delete_biblio([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete order and catalog record</a><br>
378                             [% ELSE %]
379                             <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
380                             [% END %]
381                             [% IF ( books_loo.left_item ) %]
382                             <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
383                             [% END %]
384                             [% IF ( books_loo.left_biblio ) %]
385                             <b title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios %] order(s) left</b><br>
386                             [% END %]
387                             [% IF ( books_loo.left_subscription ) %]
388                             <b title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions %] subscription(s) left</b><br>
389                             [% END %]
390                             [% IF ( books_loo.left_holds ) %]
391                             <b title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds %] hold(s) left</b>
392                             [% END %]
393                             </td>
394                             [% END %]
395                         [% END %]
396                     </tr>
397                 [% END %]
398                 </tbody>
399             </table>
400         [% END %]
401         [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
402         [% END %]
403         </div>
404         [% IF (cancelledorders_loop) %]
405           <div id="cancelledorders">
406             <h2>Cancelled orders</h2>
407             <table id="cancelledorderst">
408               <thead>
409                 <tr>
410                   <th>Order</th>
411                   <th class="gste">RRP tax exc.</th>
412                   <th class="gste">ecost tax exc.</th>
413                   <th class="gsti">RRP tax inc.</th>
414                   <th class="gsti">ecost tax inc.</th>
415                   <th>Qty.</th>
416                   <th class="gste">Total tax exc. ([% currency %])</th>
417                   <th class="gsti">Total tax inc. ([% currency %])</th>
418                   <th>GST %</th>
419                   <th>GST</th>
420                   <th>Fund</th>
421                 </tr>
422               </thead>
423               <tbody>
424                 [% FOREACH order IN cancelledorders_loop %]
425                   <tr style="color:grey">
426                     <td>
427                       <p>
428                         [% IF ( order.order_received ) %] (rcvd)[% END %]
429                         [% IF (order.title) %]
430                           [% order.title |html %] by [% order.author %]<br />
431                         [% ELSE %]
432                           <em>Deleted bibliographic record, can't find title</em><br />
433                         [% END %]
434                         [% IF ( order.notes ) %] [% order.notes %][% END %]
435                         [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
436                         [% IF ( order.issn ) %] - [% order.issn %][% END %]
437                         [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
438                         [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
439                         [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
440                       </p>
441                     </td>
442                     <td class="number gste">[% order.rrpgste %]</td>
443                     <td class="number gste">[% order.ecostgste %]</td>
444                     <td class="number gsti">[% order.rrpgsti %]</td>
445                     <td class="number gsti">[% order.ecostgsti %]</td>
446                     <td class="number">[% order.quantity %]</td>
447                     <td class="number gste">[% order.totalgste %]</td>
448                     <td class="number gsti">[% order.totalgsti %]</td>
449                     <td class="number">[% order.gstgsti %]</td>
450                     <td class="number">[% order.gstvalue %]</td>
451                     <td>[% order.budget_name %]
452                   </tr>
453                 [% END %]
454               </tbody>
455             </table>
456           </div>
457         [% END %]
458         <br />
459         [% UNLESS ( closedate ) %]
460
461     <!-- Modal -->
462     <div id="addtoBasket" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
463         <div class="modal-body"></div>
464         <div class="modal-footer">
465             <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
466         </div>
467     </div>
468
469         [% INCLUDE 'acquisitions-add-to-basket.inc' %]
470         [% END %]
471         [% END %]
472 [% END %]
473 [% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
474     [% END %]
475 [% IF ( confirm_close ) %]
476         <div id="closebasket_needsconfirmation" class="dialog alert">
477
478         <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
479             <h1>Are you sure you want to close basket [% basketname|html %]?</h1>
480             [% IF ( CAN_user_acquisition_group_manage ) %]
481             <p>
482             <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
483             <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
484             </p>
485             [% END %]
486             <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
487             <input type="hidden" value="close" name="op" />
488             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
489             <input type="hidden" name="confirm" value="1" />
490             <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
491             <input type="submit" class="approve" value="Yes, close (Y)" accesskey="y" />
492             <input type="submit" class="deny" value="No, don't close (N)" accesskey="n" onclick="javascript:window.location='/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]';return false;" />
493         </form>
494         </div>
495     [% END %]
496 </div>
497 </div>
498 <div class="yui-b">
499 [% INCLUDE 'acquisitions-menu.inc' %]
500 </div>
501 </div>
502 [% INCLUDE 'intranet-bottom.inc' %]