From 935990ee93eda5eb82322721d35eb3c2126bb697 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Sat, 21 Dec 2024 16:11:30 +0000 Subject: [PATCH] Bug 38769: Display plugin consents on self registration --- .../bootstrap/en/modules/opac-memberentry.tt | 27 +++++++++++++++++++ opac/opac-memberentry.pl | 4 +++ 2 files changed, 31 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 6db0556cfdf..eeca4f9b690 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -1053,6 +1053,33 @@ [% END %] + [% USE Dumper %] + [% IF consent_types.size %] + [% FOREACH consent_type IN consent_types.keys %] + [% IF consent_type != 'GDPR_PROCESSING' %] + [% SET consent_title = ( consent_types.$consent_type.title.$lang || consent_type.title.en ) %] + [% SET consent_desc = ( consent_types.$consent_type.description.$lang || consent_type.description.en ) %] +
+
+ +
+
+ [% END %] + [% END %] + [% END %] + [% IF Koha.Preference('PrivacyPolicyConsent') && op != 'edit' %]
diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 399d31afa4b..db958f14631 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -33,6 +33,7 @@ use C4::Members::Messaging qw( SetMessagingPreferencesFromDefaults ); use Koha::AuthUtils; use Koha::Patrons; use Koha::Patron::Consent; +use Koha::Patron::Consents; use Koha::Patron::Modification; use Koha::Patron::Modifications; use C4::Scrubber; @@ -128,6 +129,9 @@ foreach my $attr (@$attributes) { } } +my $consent_types = Koha::Patron::Consents->available_types; +$template->param( consent_types => $consent_types ); + if ( $op eq 'cud-create' ) { my %borrower = ParseCgiForBorrower($cgi); -- 2.47.1