From b8f3f177d4c3978331c5a18dc09515ffadbcdff4 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Mon, 13 Jan 2020 22:43:46 +0000 Subject: [PATCH] Bug 19793 - Add a field for email in batch patron modification --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 4 ++++ tools/modborrowers.pl | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt index 7a9333432e..0d5a8be4da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -149,6 +149,7 @@ Expiry date Circulation note OPAC note + Email address Restriction expiration Restriction comment [% FOREACH attrh IN attributes_header %] @@ -175,6 +176,7 @@ [% borrower.dateexpiry | $KohaDates %] [% borrower.borrowernotes | html %] [% borrower.opacnote | html %] + [% borrower.email | html %] [% borrower.debarred | $KohaDates %] [% borrower.debarredcomment | html %] [% FOREACH pa IN borrower.patron_attributes %] @@ -233,6 +235,8 @@ Circulation note: [% CASE 'opacnote' %] OPAC note: + [% CASE 'email' %] + Email address: [% CASE 'debarred' %] Restriction expiration: [% CASE 'debarredcomment' %] diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index eaa93eaf8f..a5bf5a0050 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -264,6 +264,12 @@ if ( $op eq 'show' ) { mandatory => ( grep /opacnote/, @mandatoryFields ) ? 1 : 0, } , + { + name => "email", + type => "text", + mandatory => ( grep /email/, @mandatoryFields ) ? 1 : 0, + } + , { name => "debarred", type => "date", @@ -288,7 +294,7 @@ if ( $op eq 'do' ) { my @disabled = $input->multi_param('disable_input'); my $infos; - for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote debarred debarredcomment/ ) { + for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote email/ ) { my $value = $input->param($field); $infos->{$field} = $value if $value; $infos->{$field} = "" if grep { /^$field$/ } @disabled; -- 2.11.0