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