Bug 23150: (follow-up) Make gdpr_proc_consent mandatory for create

When updating (patron modification), the field should not be required.

Test plan:
Check patron modification on opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2019-06-20 12:37:27 +00:00 committed by Martin Renvoize
parent 3b14f7d636
commit 6dc8306b58
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -366,6 +366,7 @@ sub GetMandatoryFields {
C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField"); C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField");
my @fields = split( /\|/, $BorrowerMandatoryField ); my @fields = split( /\|/, $BorrowerMandatoryField );
push @fields, 'gdpr_proc_consent' if C4::Context->preference('GDPR_Policy') && $action eq 'create';
foreach (@fields) { foreach (@fields) {
$mandatory_fields{$_} = 1; $mandatory_fields{$_} = 1;