View | Details | Raw Unified | Return to bug 31503
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 484-490 Link Here
484
            [% END %]
484
            [% END %]
485
        [% END %]
485
        [% END %]
486
    [% ELSE %]
486
    [% ELSE %]
487
        [% FOREACH l IN [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote' ] %]
487
        [% FOREACH l IN [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'PatronConsent' ] %]
488
            [% IF l == location %]
488
            [% IF l == location %]
489
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
489
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
490
            [% ELSE %]
490
            [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt (-4 / +14 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AdditionalContents %]
2
[% USE AdditionalContents %]
3
[% USE raw %]
3
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
4
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
4
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
5
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
5
[% SET consentview = 1 %]
6
[% SET consentview = 1 %]
Lines 41-55 Link Here
41
                        <input type="hidden" name="op" value="save"/>
42
                        <input type="hidden" name="op" value="save"/>
42
                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
43
                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
43
                        [% FOREACH consent IN consents %]
44
                        [% FOREACH consent IN consents %]
44
                            <legend><h2>Consent for [% consent.type | html %]</h2></legend>
45
                            [% SET ac_key = 'PatronConsent_' _ consent.type %]
46
                            <legend><h2>
47
                                [% IF additional_contents.$ac_key && additional_contents.$ac_key.title %]
48
                                    [% additional_contents.$ac_key.title | html %]
49
                                [% ELSE %]
50
                                    Consent for [% consent.type | html %]
51
                                [% END %]
52
                            </h2></legend>
45
                            <fieldset>
53
                            <fieldset>
46
                                <ul><li>
54
                                <ul><li>
47
                                    [% IF consent.type == 'GDPR_PROCESSING' %]
55
                                    [% IF additional_contents.$ac_key && additional_contents.$ac_key.content %]
56
                                        [% additional_contents.$ac_key.content | $raw %]
57
                                    [% ELSIF consent.type == 'GDPR_PROCESSING' # Backward compatbility ;) %]
48
                                        <p>Please read the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>.</p>
58
                                        <p>Please read the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>.</p>
49
                                        <p>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 <strong>remove</strong> your account within a reasonable time.</p>
59
                                        <p>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 <strong>remove</strong> your account within a reasonable time.</p>
50
                                        <p>Do you agree with our processing of your personal data as outlined in the policy?</p>
60
                                        <p>Do you agree with our processing of your personal data as outlined in the policy?</p>
51
                                    [% ELSE %]
61
                                    [% ELSE # Fallback only %]
52
                                        <p>Description for [% consent.type | html #TODO %]. Do you agree?</p>
62
                                        <p>Description for [% consent.type | html %]. Do you agree?</p>
53
                                    [% END %]
63
                                    [% END %]
54
                                    <p>
64
                                    <p>
55
                                        <input type="radio" name="check_[% consent.type | html %]" value="1"> Yes<br>
65
                                        <input type="radio" name="check_[% consent.type | html %]" value="1"> Yes<br>
(-)a/opac/opac-patron-consent.pl (-2 / +11 lines)
Lines 22-27 use CGI qw/-utf8/; Link Here
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::AdditionalContents;
25
use Koha::AuthorisedValueCategories;
26
use Koha::AuthorisedValueCategories;
26
use Koha::DateUtils qw( dt_from_string );
27
use Koha::DateUtils qw( dt_from_string );
27
use Koha::Patrons;
28
use Koha::Patrons;
Lines 72-77 if( C4::Context->preference('GDPR_Policy') eq 'Enforced' && $needs_redirect ) { Link Here
72
    exit;
73
    exit;
73
}
74
}
74
75
75
$template->param( patron => $patron, consents => $consents );
76
my $rs = Koha::AdditionalContents->search({
77
    # This could be moved to the template some day when both AC and TT plugin allow for it
78
    category => 'html_customizations',
79
    location => 'PatronConsent',
80
    branchcode => undef, # TODO Branch limits
81
});
82
my $additional_contents = { map { ( $_->code => { title => $_->title, content => $_->content } ) } $rs->as_list };
83
    #FIXME This assumes that the code contains PatronConsent_{CONTENT_TYPE}. This still needs AC adjustments.
84
85
$template->param( patron => $patron, consents => $consents, additional_contents => $additional_contents );
76
86
77
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
87
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
78
- 

Return to bug 31503