Bugzilla – Attachment 157777 Details for
Bug 31503
Allow several consent types on the consents tab of OPAC account page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31503: (follow-up) Styling and pre-selection
Bug-31503-follow-up-Styling-and-pre-selection.patch (text/plain), 6.94 KB, created by
Marcel de Rooy
on 2023-10-25 11:32:14 UTC
(
hide
)
Description:
Bug 31503: (follow-up) Styling and pre-selection
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-10-25 11:32:14 UTC
Size:
6.94 KB
patch
obsolete
>From 783abe31f8c441e7b00f83474c4fd95deb9f3130 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 15 Sep 2023 08:25:57 +0100 >Subject: [PATCH] Bug 31503: (follow-up) Styling and pre-selection >Content-Type: text/plain; charset=utf-8 > >This patch restores some of the wording and styling from the original >GDPR/Privacy policy feature including highlighting in a warning box. > >I also remove the jQuery approach for pre-selecting already selected >radio options and rely on standard TT processing instead. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../en/modules/opac-patron-consent.tt | 47 ++++++++++--------- > 1 file changed, 24 insertions(+), 23 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 c1b32ede80..d27d88d4ab 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 >@@ -36,14 +36,15 @@ > <input type="hidden" name="op" value="save"/> > <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/> > <h1>Your consents</h1> >- <br> > [% FOREACH consent IN consents %] > [% SET consent_type = consent.type %] > [% IF consent_type == 'GDPR_PROCESSING' %] > <legend><h2>Privacy policy consent</h2></legend> >- <p>Please read the <a target="_blank" href="[% Koha.Preference('PrivacyPolicyURL') | url %]">privacy policy</a>.</p> >- <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> >- <p>Do you agree with our processing of your personal data as outlined in the policy?</p> >+ <div class="alert alert-warning"> >+ <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> >+ <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> >+ </div> >+ <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> > [% ELSIF consent_types.$consent_type %] > [% SET consent_title = ( consent_types.$consent_type.title.$lang || consent_types.$consent_type.title.en ) %] > [% SET consent_desc = ( consent_types.$consent_type.description.$lang || consent_types.$consent_type.description.en ) %] >@@ -55,15 +56,22 @@ > <p>Do you agree?</p> > [% END %] > <fieldset> >- <input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br> >- <input type="radio" name="check_[% consent_type | html %]" value="0"> No >+ [% IF consent.given_on %] >+ <input type="radio" name="check_[% consent_type | html %]" value="1" checked="checked"> Yes<br> >+ <input type="radio" name="check_[% consent_type | html %]" value="0"> No >+ [% ELSIF consent.refused_on %] >+ <input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br> >+ <input type="radio" name="check_[% consent_type | html %]" value="0" checked="checked"> No >+ [% ELSE %] >+ <input type="radio" name="check_[% consent_type | html %]" value="1"> Yes<br> >+ <input type="radio" name="check_[% consent_type | html %]" value="0"> No >+ [% END %] >+ [% IF consent.given_on %] >+ <p class="consent_info"><strong>Your consent was registered on [% consent.given_on | html %].</strong></p> >+ [% ELSIF consent.refused_on %] >+ <p class="dissent_info"><strong>We registered that you did not consent on [% consent.refused_on | html %].</strong></p> >+ [% END %] > </fieldset> >- [% IF consent.given_on %] >- <p class="consent_info">Your consent was registered on [% consent.given_on | html %].</p> >- [% ELSIF consent.refused_on %] >- <p class="dissent_info">We registered that you did not consent on [% consent.refused_on | html %].</p> >- [% END %] >- <br> > [% END %] > <fieldset class="action"> > <input id="saveconsent" type="submit" value="Save" class="btn btn-primary" /> >@@ -85,13 +93,6 @@ > [% BLOCK jsinclude %] > <script> > $(document).ready(function() { >- [% FOREACH consent IN consents %] >- [% IF consent.given_on %] >- $("input[type='radio'][name='check_[% consent.type | html %]'][value='1']").prop('checked',true); >- [% ELSIF consent.refused_on %] >- $("input[type='radio'][name='check_[% consent.type | html %]'][value='0']").prop('checked',true); >- [% END %] >- [% END %] > // Initially no choice is made or no change, so disable button > $("#saveconsent").prop('disabled', true); > >@@ -100,11 +101,11 @@ > var v = $(this).val(); > // If former registration info present, toggle > if( v == 1 ) { >- $(this).parent().siblings('.consent_info').show(); >- $(this).parent().siblings('.dissent_info').hide(); >+ $(this).siblings('.consent_info').show(); >+ $(this).siblings('.dissent_info').hide(); > } else { >- $(this).parent().siblings('.consent_info').hide(); >- $(this).parent().siblings('.dissent_info').show(); >+ $(this).siblings('.consent_info').hide(); >+ $(this).siblings('.dissent_info').show(); > } > }); > }); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31503
:
140047
|
140048
|
140049
|
140050
|
140080
|
140081
|
140082
|
140083
|
140084
|
140085
|
140087
|
140088
|
140089
|
140090
|
140666
|
140667
|
140668
|
140669
|
140670
|
140671
|
140672
|
141216
|
141217
|
141218
|
141219
|
141220
|
141221
|
141222
|
141263
|
141264
|
141265
|
141266
|
141267
|
141268
|
141269
|
141302
|
141570
|
155000
|
155001
|
155002
|
155003
|
155177
|
155178
|
155179
|
155180
|
155189
|
155190
|
155191
|
155656
|
155657
|
155658
|
155659
|
155660
|
155661
|
155691
|
155694
|
155783
|
155784
|
155785
|
155786
|
155787
|
155788
|
155789
|
155790
|
155791
|
157117
|
157118
|
157119
|
157120
|
157121
|
157122
|
157123
|
157124
|
157125
|
157126
|
157773
|
157774
|
157775
|
157776
| 157777 |
157778
|
157779
|
157780
|
157781
|
157782
|
157783