Bug 24224: Convert OpacNavBottom system preference to additional content
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-privacy.tt
1 [% USE Koha %]
2 [% USE AdditionalContents %]
3 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
4 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Your privacy management &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-privacy' %]
11 [% INCLUDE 'masthead.inc' %]
12
13 <div class="main">
14     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
15         <ol class="breadcrumb">
16             <li class="breadcrumb-item">
17                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
18             </li>
19             <li class="breadcrumb-item">
20                 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
21             </li>
22             <li class="breadcrumb-item active">
23                 <a href="#" aria-current="page">Your privacy management</a>
24             </li>
25         </ol>
26     </nav> <!-- /#breadcrumbs -->
27
28     <div class="container-fluid">
29         <div class="row">
30             <div class="col col-lg-2 order-2 order-lg-1">
31                 <div id="navigation">
32                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
33                 </div>
34             </div>
35             <div class="col-md-12 col-lg-10 order-1">
36
37                 <div id="userprivacy" class="maincontent">
38                     <h1>Your privacy management</h1>
39
40                     [% IF deleted %]
41                         <div class="alert alert-success">Your checkout history has been deleted.</div>
42                     [% ELSIF history_not_deleted %]
43                         <div class="alert alert-warning">The deletion of your checkout history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your library of this error</div>
44                     [% ELSIF nothing_to_delete %]
45                         <div class="alert alert-warning">No checkout history to delete</div>
46                     [% END %]
47
48                     [% IF ( privacy_updated ) %]
49                         <div class="alert alert-success">Your privacy rules have been updated.</div>
50                     [% END %]
51
52                     [% IF ( Ask_data ) %]
53                         <p>We take great care in protecting your privacy. On this screen, you can define how long we keep your checkout history.</p>
54                         <p>Your options are: <p>
55                         <ul id="opac-privacy-options-list">
56                             <li class="privacy0">Forever: keep my checkout history without limit. This is the option for users who want to keep track of what they are reading.</li>
57                             <li class="privacy1">Default: keep my checkout history according to local laws. This is the default option : the library will keep your checkout history for the duration permitted by local laws.</li>
58                             <li class="privacy2">Never: Delete my checkout history immediately. This will delete all record of the item that was checked-out upon check-in.</li>
59                         </ul>
60                         <p id="note1">Please note that information on any book still checked-out must be kept by the library no matter which privacy option you choose.</p>
61                         <p id="note2">Please also note that the library staff can't update these values for you: it's your privacy!</p>
62                         <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-update-form">
63                             <legend class="sr-only">Privacy rule</legend>
64                             <input type="hidden" name="op" value="update_privacy" />
65                             <fieldset>
66                                 <label for="privacy">Please choose your privacy rule:</label>
67                                 <div class="form-group row">
68                                     <div class="col-6">
69                                         <select class="form-control" name="privacy" id="privacy">
70                                             [% IF ( privacy0 ) %]
71                                                 <option value="0" selected="selected" class="privacy0">Forever</option>
72                                             [% ELSE %]
73                                                 <option value="0" class="privacy0">Forever</option>
74                                             [% END %]
75                                             [% IF ( privacy1 ) %]
76                                                 <option value="1" selected="selected" class="privacy1">Default</option>
77                                             [% ELSE %]
78                                                 <option value="1" class="privacy1">Default</option>
79                                             [% END %]
80                                             [% IF ( privacy2 ) %]
81                                                 <option value="2" selected="selected" class="privacy2">Never</option>
82                                             [% ELSE %]
83                                                 <option value="2" class="privacy2">Never</option>
84                                             [% END %]
85                                         </select>
86                                     </div> <!-- /.col-6 -->
87                                 </div> <!-- /.form-group.row -->
88
89                                 [% IF has_guarantor_flag && (Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
90                                     [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
91                                         <div class="form-group row">
92                                             <div class="col-6">
93                                                 <label for="privacy_guarantor_checkouts">Allow your guarantor to view your current checkouts?</label>
94                                                 <select class="form-control" name="privacy_guarantor_checkouts">
95                                                     [% IF borrower.privacy_guarantor_checkouts %]
96                                                         <option value="0">No</option>
97                                                         <option value="1" selected>Yes</option>
98                                                     [% ELSE %]
99                                                         <option value="0" selected>No</option>
100                                                         <option value="1">Yes</option>
101                                                     [% END %]
102                                                 </select>
103                                             </div> <!-- /.col-6 -->
104                                         </div> <!-- /.form-group.row -->
105                                     [% END # /IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
106
107                                     [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
108                                         <div class="form-group row">
109                                             <div class="col-6">
110                                                 <label for="privacy_guarantor_fines">Allow your guarantor to view your current fines?</label>
111                                                 <select class="form-control" name="privacy_guarantor_fines">
112                                                     [% IF borrower.privacy_guarantor_fines %]
113                                                         <option value="0">No</option>
114                                                         <option value="1" selected>Yes</option>
115                                                     [% ELSE %]
116                                                         <option value="0" selected>No</option>
117                                                         <option value="1">Yes</option>
118                                                     [% END %]
119                                                 </select>
120                                             </div> <!-- /.col-6 -->
121                                         </div> <!-- /.form-group.row -->
122                                     [% END %]
123
124                                     <span class="hint">
125                                         Guaranteed by
126                                         [% FOREACH gr IN borrower.guarantor_relationships %]
127                                             [% SET g = gr.guarantor %]
128                                             [% g.firstname | html %] [% g.surname | html %]
129                                             [%- IF ! loop.last %], [% END %]
130                                         [% END %]
131                                     </span>
132                                 [% END # /IF has_guarantor_flag.. %]
133                                 <fieldset class="action">
134                                     <button type="Submit" class="btn btn-primary">Save</button>
135                                 </fieldset>
136                             </fieldset>
137                         </form> <!-- /#opac-privacy-update-form -->
138
139                         <hr />
140
141                         <h2>Immediate deletion</h2>
142
143                         <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-form">
144                             <legend class="sr-only">Immediate deletion</legend>
145                             <input type="hidden" name="op" value="delete_record" />
146                             <p>Whatever your privacy rule you choose, you can delete all your checkout history immediately by clicking here. <strong>BE CAREFUL</strong>. Once you've confirmed the deletion, no one can retrieve the list!</p>
147                             <fieldset class="action">
148                                 <input type="submit" value="Immediate deletion" class="btn btn-danger" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" />
149                             </fieldset>
150                         </form>
151
152                         [% IF Koha.Preference('StoreLastBorrower') %]
153                             <p id="store-last-borrower-msg">Please note, the last person to return an item is tracked for the management of items returned damaged.</p>
154                         [% END %]
155                     [% END # / IF Ask_data %]
156                 </div> <!-- / .userprivacy -->
157             </div> <!-- / .col-lg-10 -->
158         </div> <!-- / .row -->
159     </div> <!-- / .container-fluid -->
160 </div> <!-- / .main -->
161
162 [% INCLUDE 'opac-bottom.inc' %]
163 [% BLOCK jsinclude %][% END %]