Lines 956-961
Link Here
|
956 |
var biblionumber = "[% biblionumber | $raw %]"; |
956 |
var biblionumber = "[% biblionumber | $raw %]"; |
957 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
957 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
958 |
var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); |
958 |
var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); |
|
|
959 |
var REASON_LABEL = _("Reason: "); |
959 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
960 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
960 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
961 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
961 |
[% itemloo.itemnumber | html %]: { |
962 |
[% itemloo.itemnumber | html %]: { |
Lines 1245-1251
Link Here
|
1245 |
|
1246 |
|
1246 |
// Confirm cancelation of hold |
1247 |
// Confirm cancelation of hold |
1247 |
$(".cancel-hold").on("click",function(e) { |
1248 |
$(".cancel-hold").on("click",function(e) { |
1248 |
return confirmDelete(MSG_CONFIRM_DELETE_HOLD); |
1249 |
e.preventDefault; |
|
|
1250 |
let msg = MSG_CONFIRM_DELETE_HOLD ; |
1251 |
if ( $("#cancellation-reason").val() ) { |
1252 |
const reason = $("#cancellation-reason option:selected").text(); |
1253 |
msg += "\n\n" + REASON_LABEL + reason; |
1254 |
} |
1255 |
const confirm = confirmDelete(msg); |
1256 |
if ( confirm ) { |
1257 |
let href = $(this).attr('href'); |
1258 |
href += "&cancellation-reason=" + $("#cancellation-reason").val(); |
1259 |
window.location = href; |
1260 |
} |
1261 |
return false; |
1249 |
}); |
1262 |
}); |
1250 |
|
1263 |
|
1251 |
[% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %] |
1264 |
[% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %] |