From 3842e5ded359f3fd60524b35c9fe763f904a4aa3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 28 Jan 2022 14:47:12 +0100 Subject: [PATCH] Bug 28782: Fix cancel holds in bulk See also bug 29969. Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index eaa700a9d3..26b96b183d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1491,11 +1491,8 @@ $("#cancelModalConfirmBtn").on("click",function(e) { let link; if(cancel_link.data('bulk')) { - [% IF biblionumbers %] - link = `request.pl?biblionumbers=[% biblionumbers | url %]&action=cancelBulk&ids=${$('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')).join(',')}`; - [% ELSE %] - link = `request.pl?biblionumber=[% biblionumber | url %]&action=cancelBulk&ids=${$('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')).join(',')}`; - [% END %] + [% SET data_url = 'biblionumber=' _ biblionumbers.join('&biblionumber=') %] + link = `request.pl?[% data_url %]&action=cancelBulk&ids=${$('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')).join(',')}`; } else { let borrowernumber = cancel_link.data('borrowernumber'); let biblionumber = cancel_link.data('biblionumber'); -- 2.39.5