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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt (-24 / +24 lines)
Lines 40-53 Link Here
40
                        <input type="hidden" name="op" value="save"/>
40
                        <input type="hidden" name="op" value="save"/>
41
                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
41
                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
42
                        <h1>Your consents</h1>
42
                        <h1>Your consents</h1>
43
                        <br>
44
                        [% FOREACH consent IN consents %]
43
                        [% FOREACH consent IN consents %]
45
                            [% SET consent_type = consent.type %]
44
                            [% SET consent_type = consent.type %]
46
                            [% IF consent_type == 'GDPR_PROCESSING' %]
45
                            [% IF consent_type == 'GDPR_PROCESSING' %]
47
                                <legend><h2>Privacy policy consent</h2></legend>
46
                                <legend><h2>Privacy policy consent</h2></legend>
48
                                <p>Please read the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>.</p>
47
                                <div class="alert alert-warning">
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>
48
                                    <p>In order to keep you logged in, we need your consent to process personal data as specified in the privacy policy linked below.</p>
50
                                <p>Do you agree with our processing of your personal data as outlined in the policy?</p>
49
                                    <p>If you choose to withdraw your consent we will <strong>remove your account</strong> within a reasonable time and you should log out now.</p>
50
                                </div>
51
                                <p>I have read the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a> and agree with your processing of my personal data as outlined therein.</p>
51
                            [% ELSIF consent_types.$consent_type %]
52
                            [% ELSIF consent_types.$consent_type %]
52
                                [% SET consent_title = ( consent_types.$consent_type.title.$lang || consent_types.$consent_type.title.en ) %]
53
                                [% SET consent_title = ( consent_types.$consent_type.title.$lang || consent_types.$consent_type.title.en ) %]
53
                                [% SET consent_desc  = ( consent_types.$consent_type.description.$lang || consent_types.$consent_type.description.en )  %]
54
                                [% SET consent_desc  = ( consent_types.$consent_type.description.$lang || consent_types.$consent_type.description.en )  %]
Lines 59-73 Link Here
59
                                <p>Do you agree?</p>
60
                                <p>Do you agree?</p>
60
                            [% END %]
61
                            [% END %]
61
                            <fieldset>
62
                            <fieldset>
62
                                <input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br>
63
                                [% IF consent.given_on %]
63
                                <input type="radio" name="check_[% consent_type | html %]" value="0"> No
64
                                    <input type="radio" name="check_[% consent_type | html %]" value="1" checked="checked"> Yes<br>
65
                                    <input type="radio" name="check_[% consent_type | html %]" value="0"> No
66
                                [% ELSIF consent.refused_on %]
67
                                    <input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br>
68
                                    <input type="radio" name="check_[% consent_type | html %]" value="0" checked="checked"> No
69
                                [% ELSE %]
70
                                    <input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br>
71
                                    <input type="radio" name="check_[% consent_type | html %]" value="0"> No
72
                                [% END %]
73
                                [% IF consent.given_on %]
74
                                    <p class="consent_info"><strong>Your consent was registered on [% consent.given_on | html %].</strong></p>
75
                                [% ELSIF consent.refused_on %]
76
                                    <p class="dissent_info"><strong>We registered that you did not consent on [% consent.refused_on | html %].</strong></p>
77
                                [% END %]
64
                            </fieldset>
78
                            </fieldset>
65
                            [% IF consent.given_on %]
66
                                <p class="consent_info">Your consent was registered on [% consent.given_on | html %].</p>
67
                            [% ELSIF consent.refused_on %]
68
                                <p class="dissent_info">We registered that you did not consent on [% consent.refused_on | html %].</p>
69
                            [% END %]
70
                            <br>
71
                        [% END %]
79
                        [% END %]
72
                        <fieldset class="action">
80
                        <fieldset class="action">
73
                            <input id="saveconsent" type="submit" value="Save" class="btn btn-primary" />
81
                            <input id="saveconsent" type="submit" value="Save" class="btn btn-primary" />
Lines 89-101 Link Here
89
[% BLOCK jsinclude %]
97
[% BLOCK jsinclude %]
90
    <script>
98
    <script>
91
        $(document).ready(function() {
99
        $(document).ready(function() {
92
            [% FOREACH consent IN consents %]
93
                [% IF consent.given_on %]
94
                    $("input[type='radio'][name='check_[% consent.type | html %]'][value='1']").prop('checked',true);
95
                [% ELSIF consent.refused_on %]
96
                    $("input[type='radio'][name='check_[% consent.type | html %]'][value='0']").prop('checked',true);
97
                 [% END %]
98
            [% END %]
99
            // Initially no choice is made or no change, so disable button
100
            // Initially no choice is made or no change, so disable button
100
            $("#saveconsent").prop('disabled', true);
101
            $("#saveconsent").prop('disabled', true);
101
102
Lines 104-114 Link Here
104
                var v = $(this).val();
105
                var v = $(this).val();
105
                // If former registration info present, toggle
106
                // If former registration info present, toggle
106
                if( v == 1 ) {
107
                if( v == 1 ) {
107
                    $(this).parent().siblings('.consent_info').show();
108
                    $(this).siblings('.consent_info').show();
108
                    $(this).parent().siblings('.dissent_info').hide();
109
                    $(this).siblings('.dissent_info').hide();
109
                } else {
110
                } else {
110
                    $(this).parent().siblings('.consent_info').hide();
111
                    $(this).siblings('.consent_info').hide();
111
                    $(this).parent().siblings('.dissent_info').show();
112
                    $(this).siblings('.dissent_info').show();
112
                }
113
                }
113
            });
114
            });
114
        });
115
        });
115
- 

Return to bug 31503