From b543da7db7819fb435f835f4e4a2d3c42364df70 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 4 Oct 2022 11:43:35 +0000 Subject: [PATCH] Bug 31503: (follow-up) Check return of GetByCode Content-Type: text/plain; charset=utf-8 AV.GetByCode returns code when there is no description. So we should check the return. This patch also makes the use of the Do you agree-question a bit more consistent. No need to include it in the description. Test plan: Check the OPAC consents page when you have an AV description for a consent type and when you do not. For GDPR you should see the original GDPR text when there is no description. Signed-off-by: Marcel de Rooy --- .../opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 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 eef78ecead..c74452649c 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 @@ -49,14 +49,15 @@
  • [% description = AuthorisedValues.GetByCode( 'PATRON_CONSENT', consent.type, 1 ) # TODO additional_contents.content %] - [% IF description %] + [% IF description && description != consent.type # TODO Should GetByCode return code? %] [% description | $raw %] +

    Do you agree?

    [% ELSIF 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 # Fallback only %] -

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

    +

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

    Do you agree?

    [% END %]

    Yes
    -- 2.30.2