Lines 36-73
Link Here
|
36 |
</div> |
36 |
</div> |
37 |
<div class="col-lg-10 order-first order-md-first order-lg-2"> |
37 |
<div class="col-lg-10 order-first order-md-first order-lg-2"> |
38 |
<div id="patronconsents" class="maincontent"> |
38 |
<div id="patronconsents" class="maincontent"> |
39 |
|
|
|
40 |
[% IF Koha.Preference('PrivacyPolicyConsent') %] |
41 |
<div class="alert alert-warning"> |
42 |
<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> |
43 |
<p>Please save your consent below or log out. Thank you!</p> |
44 |
</div> |
45 |
[% END %] |
46 |
|
47 |
<h1>Your consents</h1> |
48 |
|
49 |
<form action="/cgi-bin/koha/opac-patron-consent.pl" method="post"> |
39 |
<form action="/cgi-bin/koha/opac-patron-consent.pl" method="post"> |
50 |
[% IF Koha.Preference('PrivacyPolicyConsent') %] |
40 |
<input type="hidden" name="op" value="save"/> |
51 |
<legend><h2 id="GDPR_consents">Privacy policy consents</h2></legend> |
41 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/> |
52 |
<input type="hidden" name="op" value="gdpr_proc_save"/> |
42 |
<h1>Your consents</h1> |
53 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/> |
43 |
<br> |
|
|
44 |
[% FOREACH consent IN consents %] |
45 |
[% SET consent_type = consent.type %] |
46 |
[% IF consent_type == 'GDPR_PROCESSING' %] |
47 |
<legend><h2>Privacy policy consent</h2></legend> |
48 |
<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> |
50 |
<p>Do you agree with our processing of your personal data as outlined in the policy?</p> |
51 |
[% ELSIF consent_types.$consent_type %] |
52 |
[% 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 |
<legend><h2>[% consent_title | html %]</h2></legend> |
55 |
<p>[% consent_desc | html %]</p> |
56 |
<p>Do you agree?</p> |
57 |
[% ELSE %] |
58 |
<legend><h2>Consent for [% consent_type | html %]</h2></legend> |
59 |
<p>Do you agree?</p> |
60 |
[% END %] |
54 |
<fieldset> |
61 |
<fieldset> |
55 |
<ul><li> |
62 |
<input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br> |
56 |
<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> |
63 |
<input type="radio" name="check_[% consent_type | html %]" value="0"> No |
57 |
<p><input type="radio" name="gdpr_processing" value="agreed"> Yes, I agree.<br> |
|
|
58 |
<input type="radio" name="gdpr_processing" value="disagreed"> No, I do not agree. Please remove my account within a reasonable time.</p> |
59 |
[% IF gdpr_proc_consent %] |
60 |
<p>Your consent was registered on [% gdpr_proc_consent | $KohaDates with_hours => 1 %].</p> |
61 |
[% ELSIF gdpr_proc_refusal %] |
62 |
<p>You indicated recently that you do not consent, and we will process your request soon.</p> |
63 |
[% END %] |
64 |
</li></ul> |
65 |
</fieldset> |
66 |
<fieldset class="action"> |
67 |
<input id="saveconsent" type="submit" value="Save" class="btn btn-primary" /> |
68 |
</fieldset> |
64 |
</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> |
69 |
[% END %] |
71 |
[% END %] |
70 |
|
72 |
<fieldset class="action"> |
|
|
73 |
<input id="saveconsent" type="submit" value="Save" class="btn btn-primary" /> |
74 |
</fieldset> |
71 |
</form> |
75 |
</form> |
72 |
|
76 |
|
73 |
[% IF Koha.Preference('CookieConsent') %] |
77 |
[% IF Koha.Preference('CookieConsent') %] |
Lines 75-81
Link Here
|
75 |
<button id="viewCookieConsents" type="button" class="btn btn-success">View your cookie consents</button> |
79 |
<button id="viewCookieConsents" type="button" class="btn btn-success">View your cookie consents</button> |
76 |
[% END %] |
80 |
[% END %] |
77 |
|
81 |
|
78 |
</div> <!-- / #userpasswd --> |
82 |
</div> <!-- / #patronconsents --> |
79 |
</div> <!-- / .col-lg-10 --> |
83 |
</div> <!-- / .col-lg-10 --> |
80 |
</div> <!-- / .row --> |
84 |
</div> <!-- / .row --> |
81 |
</div> <!-- / .container-fluid --> |
85 |
</div> <!-- / .container-fluid --> |
Lines 84-110
Link Here
|
84 |
[% INCLUDE 'opac-bottom.inc' %] |
88 |
[% INCLUDE 'opac-bottom.inc' %] |
85 |
[% BLOCK jsinclude %] |
89 |
[% BLOCK jsinclude %] |
86 |
<script> |
90 |
<script> |
87 |
var consent = null; |
|
|
88 |
$(document).ready(function() { |
91 |
$(document).ready(function() { |
89 |
[% IF gdpr_proc_consent %] |
92 |
[% FOREACH consent IN consents %] |
90 |
consent=1; |
93 |
[% IF consent.given_on %] |
91 |
$("input[type='radio'][value='agreed']").prop('checked',true); |
94 |
$("input[type='radio'][name='check_[% consent.type | html %]'][value='1']").prop('checked',true); |
92 |
$(".alert").hide(); |
95 |
[% ELSIF consent.refused_on %] |
93 |
[% ELSIF gdpr_proc_refusal %] |
96 |
$("input[type='radio'][name='check_[% consent.type | html %]'][value='0']").prop('checked',true); |
94 |
consent=0; |
97 |
[% END %] |
95 |
$("input[type='radio'][value='disagreed']").prop('checked',true); |
|
|
96 |
[% ELSE %] |
97 |
[% END %] |
98 |
[% END %] |
|
|
99 |
// Initially no choice is made or no change, so disable button |
98 |
$("#saveconsent").prop('disabled', true); |
100 |
$("#saveconsent").prop('disabled', true); |
99 |
|
101 |
|
100 |
$("input[type='radio']").click(function() { |
102 |
$("input[type='radio']").click(function() { |
101 |
var radio = $(this).val(); |
103 |
$("#saveconsent").prop('disabled', false); |
102 |
if(radio=='agreed' && (consent==null || consent==0)) $("#saveconsent").prop('disabled', false); |
104 |
var v = $(this).val(); |
103 |
if(radio=='disagreed' && (consent==null || consent==1)) $("#saveconsent").prop('disabled', false); |
105 |
// If former registration info present, toggle |
104 |
if(radio=='agreed') $(".alert").hide(); |
106 |
if( v == 1 ) { |
105 |
if(radio=='disagreed') $(".alert").show(); |
107 |
$(this).parent().siblings('.consent_info').show(); |
|
|
108 |
$(this).parent().siblings('.dissent_info').hide(); |
109 |
} else { |
110 |
$(this).parent().siblings('.consent_info').hide(); |
111 |
$(this).parent().siblings('.dissent_info').show(); |
112 |
} |
106 |
}); |
113 |
}); |
107 |
|
|
|
108 |
}); |
114 |
}); |
109 |
</script> |
115 |
</script> |
110 |
[% END %] |
116 |
[% END %] |