From 4bad6ec25feceb9a1a7701b5f7ac113f9a1ffa1b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 3 Dec 2019 19:30:44 +0100 Subject: [PATCH] Bug 20443: Fix add/edit for checkboxes Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- admin/patron-attr-types.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index ab0ebccf66..b923638427 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -115,13 +115,13 @@ sub add_update_attribute_type { my $code = shift; my $description = $input->param('description'); - my $repeatable = $input->param('repeatable') || 0; - my $unique_id = $input->param('unique_id') || 0; - my $opac_display = $input->param('opac_display') || 0; - my $opac_editable = $input->param('opac_editable') || 0; - my $staff_searchable = $input->param('staff_searchable') || 0; + my $repeatable = $input->param('repeatable') ? 1 : 0; + my $unique_id = $input->param('unique_id') ? 1 : 0; + my $opac_display = $input->param('opac_display') ? 1 : 0; + my $opac_editable = $input->param('opac_editable') ? 1 : 0; + my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; my $authorised_value_category = $input->param('authorised_value_category'); - my $display_checkout = $input->param('display_checkout') || 0; + my $display_checkout = $input->param('display_checkout') ? 1 : 0; my $category_code = $input->param('category_code'); my $class = $input->param('class'); -- 2.39.5