Lines 30-35
use C4::Members::Attributes qw( GetBorrowerAttributes );
Link Here
|
30 |
use C4::Form::MessagingPreferences; |
30 |
use C4::Form::MessagingPreferences; |
31 |
use Koha::AuthUtils; |
31 |
use Koha::AuthUtils; |
32 |
use Koha::Patrons; |
32 |
use Koha::Patrons; |
|
|
33 |
use Koha::Patron::Consent; |
33 |
use Koha::Patron::Modification; |
34 |
use Koha::Patron::Modification; |
34 |
use Koha::Patron::Modifications; |
35 |
use Koha::Patron::Modifications; |
35 |
use C4::Scrubber; |
36 |
use C4::Scrubber; |
Lines 207-214
if ( $action eq 'create' ) {
Link Here
|
207 |
$template->param( OpacPasswordChange => |
208 |
$template->param( OpacPasswordChange => |
208 |
C4::Context->preference('OpacPasswordChange') ); |
209 |
C4::Context->preference('OpacPasswordChange') ); |
209 |
|
210 |
|
|
|
211 |
my $consent_dt = delete $borrower{gdpr_proc_consent}; |
210 |
my ( $borrowernumber, $password ) = AddMember_Opac(%borrower); |
212 |
my ( $borrowernumber, $password ) = AddMember_Opac(%borrower); |
|
|
213 |
Koha::Patron::Consent->new({ borrowernumber => $borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt; |
211 |
C4::Members::Attributes::SetBorrowerAttributes( $borrowernumber, $attributes ); |
214 |
C4::Members::Attributes::SetBorrowerAttributes( $borrowernumber, $attributes ); |
|
|
215 |
|
212 |
C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if $borrowernumber && C4::Context->preference('EnhancedMessagingPreferences'); |
216 |
C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if $borrowernumber && C4::Context->preference('EnhancedMessagingPreferences'); |
213 |
|
217 |
|
214 |
$template->param( password_cleartext => $password ); |
218 |
$template->param( password_cleartext => $password ); |
Lines 353-358
sub GetMandatoryFields {
Link Here
|
353 |
C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField"); |
357 |
C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField"); |
354 |
|
358 |
|
355 |
my @fields = split( /\|/, $BorrowerMandatoryField ); |
359 |
my @fields = split( /\|/, $BorrowerMandatoryField ); |
|
|
360 |
push @fields, 'gdpr_proc_consent' if C4::Context->preference('GDPR_Policy'); |
356 |
|
361 |
|
357 |
foreach (@fields) { |
362 |
foreach (@fields) { |
358 |
$mandatory_fields{$_} = 1; |
363 |
$mandatory_fields{$_} = 1; |
Lines 459-464
sub ParseCgiForBorrower {
Link Here
|
459 |
$borrower{'dateofbirth'} = undef; |
464 |
$borrower{'dateofbirth'} = undef; |
460 |
} |
465 |
} |
461 |
|
466 |
|
|
|
467 |
# Replace checkbox 'agreed' by datetime in gdpr_proc_consent |
468 |
$borrower{gdpr_proc_consent} = dt_from_string if $borrower{gdpr_proc_consent} && $borrower{gdpr_proc_consent} eq 'agreed'; |
469 |
|
462 |
return %borrower; |
470 |
return %borrower; |
463 |
} |
471 |
} |
464 |
|
472 |
|