From ad3dad0866b21a217c1043cd05c31eb8961a42b6 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 --- admin/patron-attr-types.pl | 3 ++- .../intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index 8aab052be4..636535ce45 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,6 +119,7 @@ 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 $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; @@ -152,6 +152,7 @@ sub add_update_attribute_type { opac_display => $opac_display, opac_editable => $opac_editable, staff_searchable => $staff_searchable, + 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 862dad52fc..5cd3067a5c 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 @@ -126,6 +126,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.11.0