From 2d17e1ccfd3362ac534bb94a60c89f2c28ebdd92 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Fri, 14 Feb 2020 15:21:48 +0100 Subject: [PATCH] Bug 22833 - QA followup This patch incorporates the suggestions made by Stina Hallin. To test: - Apply with the other patches and make sure there are no errors when following the previous test plan. Signed-off-by: Stina Hallin --- admin/itemtypes.pl | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 8a05bc801a..37744764b6 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -105,8 +105,8 @@ if ( $op eq 'add_form' ) { my $checkinmsgtype = $input->param('checkinmsgtype'); my $hideinopac = $input->param('hideinopac') // 0; my $searchcategory = $input->param('searchcategory'); - my $can_suspend_hold = $input->param('can_suspend_hold'); - my $can_cancel_hold = $input->param('can_cancel_hold'); + my $can_suspend_hold = $input->param('can_suspend_hold') // 0; + my $can_cancel_hold = $input->param('can_cancel_hold') // 0; if ( $itemtype and $is_a_modif ) { # it's a modification $itemtype->description($description); diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index 037d17adf8..3ff693899b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -183,7 +183,7 @@ [% END # / IF SuspendHoldsOpac %] [% IF ! onlyinfo %] - [% IF ( HOLD.is_cancelable_from_opac ) %] + [% IF ( HOLD.is_cancelable_from_opac && ItemTypes.CanCancelHold( HOLD.biblio.biblioitem.itemtype )) %]
-- 2.11.0