Lines 43-54
Link Here
|
43 |
window.location = "[% script_name %]?op=close&basketno=[% basketno %]"; |
43 |
window.location = "[% script_name %]?op=close&basketno=[% basketno %]"; |
44 |
} |
44 |
} |
45 |
} |
45 |
} |
46 |
function confirm_deletion() { |
46 |
|
47 |
var is_confirmed = confirm(_("Are you sure you want to delete this basket?")); |
47 |
function delete_basket(basketno,booksellerid,delbiblio) { |
48 |
if (is_confirmed) { |
48 |
window.location = "[% script_name %]?op=delete_confirm&delbiblio="+delbiblio+"&basketno="+basketno+"&booksellerid="+booksellerid; |
49 |
window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]"; |
|
|
50 |
} |
51 |
} |
49 |
} |
|
|
50 |
|
52 |
function confirm_delete_item(ordernumber, biblionumber) { |
51 |
function confirm_delete_item(ordernumber, biblionumber) { |
53 |
var is_confirmed = confirm(_("Are you sure you want to delete this order ?")); |
52 |
var is_confirmed = confirm(_("Are you sure you want to delete this order ?")); |
54 |
if (is_confirmed) { |
53 |
if (is_confirmed) { |
Lines 113-122
Link Here
|
113 |
var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { |
112 |
var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { |
114 |
"sPaginationType": "four_button" |
113 |
"sPaginationType": "four_button" |
115 |
} ) ); |
114 |
} ) ); |
116 |
$("#delbasketbutton").on("click",function(e){ |
|
|
117 |
e.preventDefault(); |
118 |
confirm_deletion(); |
119 |
}); |
120 |
$("#reopenbutton").on("click",function(e){ |
115 |
$("#reopenbutton").on("click",function(e){ |
121 |
e.preventDefault(); |
116 |
e.preventDefault(); |
122 |
confirm_reopen(); |
117 |
confirm_reopen(); |
Lines 147-154
Link Here
|
147 |
<div id="toolbar" class="btn-toolbar"> |
142 |
<div id="toolbar" class="btn-toolbar"> |
148 |
<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> |
143 |
<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> |
149 |
<div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div> |
144 |
<div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div> |
150 |
<div class="btn-group"><a href="#" class="btn btn-small" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div> |
145 |
<div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div> |
151 |
[% IF ( unclosable ) %] |
146 |
[% IF ( unclosable ) %] |
152 |
[% ELSIF ( uncertainprices ) %] |
147 |
[% ELSIF ( uncertainprices ) %] |
153 |
<div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div> |
148 |
<div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div> |
154 |
[% ELSE %] |
149 |
[% ELSE %] |
Lines 157-164
Link Here
|
157 |
</div> |
152 |
</div> |
158 |
[% END %] |
153 |
[% END %] |
159 |
<div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div> |
154 |
<div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div> |
160 |
|
|
|
161 |
</div> |
155 |
</div> |
|
|
156 |
<!-- Modal for confirm deletion box--> |
157 |
<div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true"> |
158 |
<div class="modal-header"> |
159 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
160 |
<h3>Confirm deletion</h3> |
161 |
</div> |
162 |
<div class="modal-body"> |
163 |
<p>Are you sure you want to delete this basket?</p> |
164 |
<p>Warning:</p> |
165 |
<p>All orders of this basket will be cancelled and used funds will be refunded.</p> |
166 |
<p>If items have been created at ordering or receipt stage, they will be deleted.</p> |
167 |
<p>You can choose to delete records if possible (if they don't have any item attached, any subscription and any other order).</p> |
168 |
</div> |
169 |
<div class="modal-footer"> |
170 |
<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> |
171 |
<button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button> |
172 |
<button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button> |
173 |
</div> |
174 |
</div> |
175 |
<!-- End of Modal--> |
162 |
[% ELSE %] |
176 |
[% ELSE %] |
163 |
[% UNLESS ( grouped ) %] |
177 |
[% UNLESS ( grouped ) %] |
164 |
<div id="toolbar" class="btn-toolbar"> |
178 |
<div id="toolbar" class="btn-toolbar"> |
165 |
- |
|
|