From e6e5e3012d04beed263d50a0f31a60c3556075f5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 17 May 2019 09:14:00 -0500 Subject: [PATCH] Bug 22844: Add the new entry to the patron attr types form Will conflict with bug 20443 \o/ Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- admin/patron-attr-types.pl | 7 ++++--- .../prog/en/modules/admin/patron-attr-types.tt | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index b1e0a4d422..fbbfa7226c 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -98,7 +98,6 @@ sub error_add_attribute_type_form { my $template = shift; $template->param(description => scalar $input->param('description')); - $template->param( category_code => scalar $input->param('category_code') ); $template->param( class => scalar $input->param('class') ); @@ -120,7 +119,8 @@ sub add_update_attribute_type { 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 $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0; + my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0; + my $mandatory = $input->param('mandatory') ? 1 : 0; my $authorised_value_category = $input->param('authorised_value_category'); my $display_checkout = $input->param('display_checkout') ? 1 : 0; my $category_code = $input->param('category_code') || undef; @@ -153,7 +153,8 @@ sub add_update_attribute_type { opac_display => $opac_display, opac_editable => $opac_editable, staff_searchable => $staff_searchable, - keep_for_pseudonymization => $keep_for_pseudonymization, + keep_for_pseudonymization => $keep_for_pseudonymization, + mandatory => $mandatory, authorised_value_category => $authorised_value_category, display_checkout => $display_checkout, category_code => $category_code, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt index 945ca3a78c..bd711ed68c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt @@ -127,6 +127,14 @@ [% END %] Check to make this attribute staff_searchable in the staff patron search. +
  • + [% IF attribute_type AND attribute_type.mandatory %] + + [% ELSE %] + + [% END %] + Check to make this attribute mandatory when creating or editing a patron. +
  • [% IF attribute_type AND attribute_type.display_checkout %] -- 2.39.5