|
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 185-192
Link Here
|
| 185 |
<div id="toolbar" class="btn-toolbar"> |
180 |
<div id="toolbar" class="btn-toolbar"> |
| 186 |
<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> |
181 |
<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> |
| 187 |
<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> |
182 |
<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> |
| 188 |
<div class="btn-group"><a href="#" class="btn btn-small" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div> |
183 |
<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> |
| 189 |
[% IF ( unclosable ) %] |
184 |
[% IF ( unclosable ) %] |
| 190 |
[% ELSIF ( uncertainprices ) %] |
185 |
[% ELSIF ( uncertainprices ) %] |
| 191 |
<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> |
186 |
<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> |
| 192 |
[% ELSE %] |
187 |
[% ELSE %] |
|
Lines 195-202
Link Here
|
| 195 |
</div> |
190 |
</div> |
| 196 |
[% END %] |
191 |
[% END %] |
| 197 |
<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> |
192 |
<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> |
| 198 |
|
|
|
| 199 |
</div> |
193 |
</div> |
|
|
194 |
<!-- Modal for confirm deletion box--> |
| 195 |
<div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true"> |
| 196 |
<div class="modal-header"> |
| 197 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 198 |
<h3>Confirm deletion</h3> |
| 199 |
</div> |
| 200 |
<div class="modal-body"> |
| 201 |
<p>Are you sure you want to delete this basket?</p> |
| 202 |
<p>Warning:</p> |
| 203 |
<p>All orders of this basket will be cancelled and used funds will be refunded.</p> |
| 204 |
<p>If items have been created at ordering or receipt stage, they will be deleted.</p> |
| 205 |
<p>You can choose to delete records if possible (if they don't have any item attached, any subscription and any other order).</p> |
| 206 |
</div> |
| 207 |
<div class="modal-footer"> |
| 208 |
<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> |
| 209 |
<button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button> |
| 210 |
<button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button> |
| 211 |
</div> |
| 212 |
</div> |
| 213 |
<!-- End of Modal--> |
| 200 |
[% ELSE %] |
214 |
[% ELSE %] |
| 201 |
[% UNLESS ( grouped ) %] |
215 |
[% UNLESS ( grouped ) %] |
| 202 |
<div id="toolbar" class="btn-toolbar"> |
216 |
<div id="toolbar" class="btn-toolbar"> |
| 203 |
- |
|
|