Bug 27742: Page titles have unique info first
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-patron-consent.tt
1 [% USE Koha %]
2 [% SET consentview = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Your consents &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
7 </head>
8 [% INCLUDE 'bodytag.inc' bodyid='opac-patron-consent' %]
9 [% INCLUDE 'masthead.inc' %]
10
11 <div class="main">
12     <nav aria-label="breadcrumb">
13         <ul class="breadcrumb">
14             <li class="breadcrumb-item">
15                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
16             </li>
17             <li class="breadcrumb-item">
18                 <a href="/cgi-bin/koha/opac-user.pl">[% patron.firstname | html %] [% patron.surname | html %]</a>
19             </li>
20             <li class="breadcrumb-item" aria-current="page">
21                 <a href="#">Your consents</a>
22             </li>
23         </ul>
24     </nav>
25
26     <div class="container-fluid">
27         <div class="row">
28             <div class="col-lg-2">
29                 <div id="navigation">
30                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
31                 </div>
32             </div>
33             <div class="col-lg-10 order-first order-md-first order-lg-2">
34                 <div id="patronconsents" class="maincontent">
35
36                     [% IF Koha.Preference('GDPR_Policy') %]
37                     <div class="alert alert-warning">
38                             <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>
39                             <p>Please save your consent below or log out. Thank you!</p>
40                     </div>
41                     [% END %]
42
43                     <h3>Your consents</h3>
44
45                     <form action="/cgi-bin/koha/opac-patron-consent.pl" method="post">
46                         [% IF Koha.Preference('GDPR_Policy') %]
47                             <h5>GDPR consents</h5>
48                             <input type="hidden" name="op" value="gdpr_proc_save"/>
49                             <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"/>
50                             <fieldset>
51                                 <ul><li>
52                                     <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>
53                                     <p><input type="radio" name="gdpr_processing" value="agreed"> Yes, I agree.<br>
54                                     <input type="radio" name="gdpr_processing" value="disagreed"> No, I do not agree. Please remove my account within a reasonable time.</p>
55                                     [% IF gdpr_proc_consent %]
56                                         <p>Your consent was registered on [% gdpr_proc_consent | html %].</p>
57                                     [% ELSIF gdpr_proc_refusal %]
58                                         <p>You indicated recently that you do not consent, and we will process your request soon.</p>
59                                     [% END %]
60                                 </li></ul>
61                             </fieldset>
62                             <fieldset class="action">
63                                 <input id="saveconsent" type="submit" value="Save" class="btn btn-primary" />
64                             </fieldset>
65                         [% END %]
66
67                     </form>
68
69                 </div> <!-- / #userpasswd -->
70             </div> <!-- / .col-lg-10 -->
71         </div> <!-- / .row -->
72     </div> <!-- / .container-fluid -->
73 </div> <!-- / .main -->
74
75 [% INCLUDE 'opac-bottom.inc' %]
76 [% BLOCK jsinclude %]
77     <script>
78         var consent = null;
79         $(document).ready(function() {
80             [% IF gdpr_proc_consent %]
81                 consent=1;
82                 $("input[type='radio'][value='agreed']").prop('checked',true);
83                 $(".alert").hide();
84             [% ELSIF gdpr_proc_refusal %]
85                 consent=0;
86                 $("input[type='radio'][value='disagreed']").prop('checked',true);
87             [% ELSE %]
88             [% END %]
89             $("#saveconsent").prop('disabled', true);
90
91             $("input[type='radio']").click(function() {
92                 var radio = $(this).val();
93                 if(radio=='agreed' && (consent==null || consent==0)) $("#saveconsent").prop('disabled', false);
94                 if(radio=='disagreed' && (consent==null || consent==1)) $("#saveconsent").prop('disabled', false);
95                 if(radio=='agreed') $(".alert").hide();
96                 if(radio=='disagreed') $(".alert").show();
97             });
98
99         });
100     </script>
101 [% END %]