From 44e46354621936abe1b79b21252eff8ad52696f9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 2 Sep 2022 07:41:27 +0000 Subject: [PATCH] Bug 31503: Configurable consent text Content-Type: text/plain; charset=utf-8 Although I planned to implement this via Additional contents (AC), I am using the AV description here after all, since AC does not yet provide enough flexibility. The title on the consents page is constructed from the consent type now still, and the description is from the OPAC description in AV (PATRON_CONSENT). Note: AV allows you to add html in the description, although it was not meant to do so. When we switch to AC later, we will have the possibility of html, languages, title and content. Second note: We still need AV translations too. See Bugzilla. Test plan: [1] Add a NEWSLETTER value under AV category PATRON_CONSENT. [2] Add no OPAC description. Save. Hit OPAC consents page. [3] Add description. Check page again. [4] Add html to description. Check again. Signed-off-by: Marcel de Rooy --- .../bootstrap/en/modules/opac-patron-consent.tt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt index 512a0a8078..783bf4fbe4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt @@ -1,5 +1,7 @@ [% USE Koha %] [% USE AdditionalContents %] +[% USE AuthorisedValues %] +[% USE raw %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET consentview = 1 %] @@ -41,15 +43,23 @@ [% FOREACH consent IN consents %] -

Consent for [% consent.type | html %]

+

+ Consent for [% consent.type | html # TODO additional_contents.title %] +

  • - [% IF consent.type == 'GDPR_PROCESSING' %] + [% IF consent.type == 'GDPR_PROCESSING' # Backward compatbility ;) %]

    Please read the privacy policy.

    In order to keep you logged in, we need your consent to process personal data as specified in the EU General Data Protection Regulation of May 25, 2018. If you would not agree, we will need to remove your account within a reasonable time.

    Do you agree with our processing of your personal data as outlined in the policy?

    [% ELSE %] -

    Description for [% consent.type | html #TODO %]. Do you agree?

    + [% description = AuthorisedValues.GetByCode('PATRON_CONSENT',consent.type,1) # TODO additional_contents.content %] + [% IF description %] + [% description | $raw %] + [% ELSE # Fallback %] +

    Description for [% consent.type | html %].

    + [% END %] +

    Do you agree?

    [% END %]

    Yes
    -- 2.30.2