Bug 29658: Fix crash on cancelling cancelled order
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / cancelorder.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Cancel order &rsaquo; Acquisition &rsaquo; Koha</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5
6 <body id="acq_cancelorder" class="acq">
7 [% INCLUDE 'header.inc' %]
8
9 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
10     <ol>
11         <li>
12             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
13         </li>
14         <li>
15             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
16         </li>
17         <li>
18             <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% basket.bookseller.id | uri %]">[% basket.bookseller.name | html %]</a>
19         </li>
20         <li>
21             <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">Basket [% basket.basketname | html %] ([% basket.basketno | html %]) for [% basket.bookseller.name | html %]</a>
22         <li>
23             <a href="#" aria-current="page">Cancel order</a>
24         </li>
25     </ol>
26 </nav>
27
28 <div class="main container-fluid">
29     <div class="row">
30         <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
31
32       [% UNLESS ( confirmcancel ) %]
33       <form method="post" action="">
34         <div class="dialog alert">
35           <h1>Are you sure you want to cancel this order ([% ordernumber | html %])</h1>
36           <p>
37             [% IF (del_biblio) %]
38               <span>Bibliographic record will be deleted too.</span>
39             [% ELSE %]
40               <span>Bibliographic record will not be deleted.</span>
41             [% END %]
42           </p>
43           <p>
44             [% PROCESS 'av-build-dropbox.inc' name="reason", category="ORDER_CANCELLATION_REASON" default="0" %]
45           </p>
46           <input type="hidden" name="action" value="confirmcancel" />
47           <input type="hidden" value="[% ordernumber | html %]" name="ordernumber" />
48           <input type="hidden" value="[% biblionumber | html %]" name="biblionumber" />
49           <input type="hidden" value="[% basket.basketno | html %]" name="basketno" />
50           <input type="hidden" value="[% referrer | html %]" name="referrer" />
51           [% IF (del_biblio) %]
52             <input type="hidden" value="1" name="del_biblio" />
53           [% END %]
54           <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, cancel (Y)</button>
55           <button class="deny" accesskey="n" onclick="window.location='[% referrer | html %]';return false;"><i class="fa fa-fw fa-remove"></i> No, don't cancel (N)</button>
56         </div>
57       </form>
58       [% ELSE %]
59         [% IF ( success_cancelorder ) %]
60             <div class="dialog message">
61                 The order has been successfully cancelled
62         [% ELSE %]
63             <div class="dialog alert">
64                 An error has occurred.
65                 [% IF error_order_already_cancelled %]
66                     <p>The order has been cancelled already.</p>
67                 [% ELSIF error_order_not_found %]
68                     <p>The order could not be found.</p>
69                 [% END %]
70                 [% IF ( error_delitem ) %]
71                     <p>The order has been cancelled, although one or more items could not have been deleted.</p>
72                 [% END %]
73                 [% IF ( error_delbiblio ) %]
74                 <p>The order has been cancelled, although the record has not been deleted.</p>
75                 [% END %]
76         [% END %]
77                 <p><a href="[% referrer | url %]">OK</a></p>
78             </div>
79       [% END %]
80
81     </div>
82   </div>
83
84 [% INCLUDE 'intranet-bottom.inc' %]