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