Bug 28955: (follow-up) Set to fall back
[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 || default_branch, blocktitle => 0 ) %]
4 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, 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 delete_all_requested || delete_checkouts_requested || delete_holds_requested %]
41                         [% IF delete_all_requested || delete_checkouts_requested %]
42                             [% IF deleted_checkouts %]
43                                 <div class="alert alert-success">Your checkout history has been deleted.</div>
44                             [% ELSIF error_deleting_checkouts_history %]
45                                 <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>
46                             [% ELSIF no_checkouts_to_delete %]
47                                 <div class="alert alert-warning">No checkout history to delete</div>
48                             [% END %]
49                         [% END %]
50
51                         [% IF delete_all_requested || delete_holds_requested %]
52                             [% IF deleted_holds %]
53                                 <div class="alert alert-success">Your hold history has been deleted.</div>
54                             [% ELSIF error_deleting_holds_history %]
55                                 <div class="alert alert-warning">The deletion of your hold history failed. Please help to fix the system by informing your library of this error</div>
56                             [% ELSIF no_holds_to_delete %]
57                                 <div class="alert alert-warning">No hold history to delete</div>
58                             [% END %]
59                         [% END %]
60                     [% END %]
61
62                     [% IF ( privacy_updated ) %]
63                         <div class="alert alert-success">Your privacy rules have been updated.</div>
64                     [% END %]
65
66                     [% IF ( Ask_data ) %]
67                         <p>We take great care in protecting your privacy. On this screen, you can define how long we keep your checkout and hold history.</p>
68                         <p>Your options are: <p>
69                         <ul id="opac-privacy-options-list">
70                             <li class="privacy0">Forever: keep my history without limit. This is the option for users who want to keep track of what they are reading or placed a hold on.</li>
71                             <li class="privacy1">Default: keep my history according to local laws. This is the default option : the library will keep your history for the duration permitted by local laws.</li>
72                             <li class="privacy2">Never: Delete my history immediately. This will delete all record of the item that was checked-out upon check-in, and hold history upon fulfillment or cancellation.</li>
73                         </ul>
74                         <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>
75                         <p id="note2">Please also note that the library staff can't update these values for you: it's your privacy!</p>
76                         <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-update-form">
77                             <legend class="sr-only">Privacy rule</legend>
78                             <input type="hidden" name="op" value="update_privacy" />
79                             <fieldset>
80                                 <label for="privacy">Please choose your privacy rule:</label>
81                                 <div class="form-group row">
82                                     <div class="col-6">
83                                         <select class="form-control" name="privacy" id="privacy">
84                                             [% IF ( privacy0 ) %]
85                                                 <option value="0" selected="selected" class="privacy0">Forever</option>
86                                             [% ELSE %]
87                                                 <option value="0" class="privacy0">Forever</option>
88                                             [% END %]
89                                             [% IF ( privacy1 ) %]
90                                                 <option value="1" selected="selected" class="privacy1">Default</option>
91                                             [% ELSE %]
92                                                 <option value="1" class="privacy1">Default</option>
93                                             [% END %]
94                                             [% IF ( privacy2 ) %]
95                                                 <option value="2" selected="selected" class="privacy2">Never</option>
96                                             [% ELSE %]
97                                                 <option value="2" class="privacy2">Never</option>
98                                             [% END %]
99                                         </select>
100                                     </div> <!-- /.col-6 -->
101                                 </div> <!-- /.form-group.row -->
102
103                                 [% IF has_guarantor_flag && (Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
104                                     [% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
105                                         <div class="form-group row">
106                                             <div class="col-6">
107                                                 <label for="privacy_guarantor_checkouts">Allow your guarantor to view your current checkouts?</label>
108                                                 <select class="form-control" name="privacy_guarantor_checkouts">
109                                                     [% IF borrower.privacy_guarantor_checkouts %]
110                                                         <option value="0">No</option>
111                                                         <option value="1" selected>Yes</option>
112                                                     [% ELSE %]
113                                                         <option value="0" selected>No</option>
114                                                         <option value="1">Yes</option>
115                                                     [% END %]
116                                                 </select>
117                                             </div> <!-- /.col-6 -->
118                                         </div> <!-- /.form-group.row -->
119                                     [% END # /IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
120
121                                     [% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
122                                         <div class="form-group row">
123                                             <div class="col-6">
124                                                 <label for="privacy_guarantor_fines">Allow your guarantor to view your current fines?</label>
125                                                 <select class="form-control" name="privacy_guarantor_fines">
126                                                     [% IF borrower.privacy_guarantor_fines %]
127                                                         <option value="0">No</option>
128                                                         <option value="1" selected>Yes</option>
129                                                     [% ELSE %]
130                                                         <option value="0" selected>No</option>
131                                                         <option value="1">Yes</option>
132                                                     [% END %]
133                                                 </select>
134                                             </div> <!-- /.col-6 -->
135                                         </div> <!-- /.form-group.row -->
136                                     [% END %]
137
138                                     <span class="hint">
139                                         Guaranteed by
140                                         [% FOREACH gr IN borrower.guarantor_relationships %]
141                                             [% SET g = gr.guarantor %]
142                                             [% g.firstname | html %] [% g.surname | html %]
143                                             [%- IF ! loop.last %], [% END %]
144                                         [% END %]
145                                     </span>
146                                 [% END # /IF has_guarantor_flag.. %]
147                                 <fieldset class="action">
148                                     <button type="Submit" class="btn btn-primary">Save</button>
149                                 </fieldset>
150                             </fieldset>
151                         </form> <!-- /#opac-privacy-update-form -->
152
153                         <hr />
154
155                         <h2>Immediate deletion</h2>
156
157                         <p>You can delete all your checkout and hold history immediately by clicking here. <strong>BE CAREFUL</strong>. Once you've confirmed the deletion, no one can retrieve the list!</p>
158
159                         <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-checkouts">
160                             <input type="hidden" name="op" value="delete_record" />
161                             <input type="hidden" name="checkouts" value="1" />
162                         </form>
163
164                         <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-holds">
165                             <input type="hidden" name="op" value="delete_record" />
166                             <input type="hidden" name="holds" value="1" />
167                         </form>
168
169                         <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-all">
170                             <input type="hidden" name="op" value="delete_record" />
171                             <input type="hidden" name="all" value="1" />
172                         </form>
173                         <table class="table table-bordered table-condensed table-striped">
174                             <tr>
175                                 <td colspan=7>Immediately delete my checkout history. This action cannot be undone.</td>
176                                 <td colspan=1>
177                                     <fieldset class="action">
178                                         <input type="submit" value="Delete checkout history" form="opac-privacy-delete-checkouts" class="btn btn-danger btn-block" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" />
179                                     </fieldset>
180                                 </td>
181                             </tr>
182                             <tr>
183                                 <td colspan=7>Immediately delete my hold history. This action cannot be undone.</td>
184                                 <td colspan=1>
185                                     <fieldset class="action">
186                                         <input type="submit" value="Delete hold history" form="opac-privacy-delete-holds" class="btn btn-danger btn-block" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" />
187                                     </fieldset>
188                                 </td>
189                             </tr>
190                             <tr>
191                                 <td colspan=7>Immediately delete my checkout history & my hold history. This action cannot be undone.</td>
192                                 <td colspan=1>
193                                     <fieldset class="action">
194                                         <input type="submit" value="Delete checkout and hold history" form="opac-privacy-delete-all" class="btn btn-danger btn-block" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" />
195                                     </fieldset>
196                                 </td>
197                             </tr>
198                         </table>
199
200                         [% IF Koha.Preference('StoreLastBorrower') %]
201                             <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>
202                         [% END %]
203                     [% END # / IF Ask_data %]
204                 </div> <!-- / .userprivacy -->
205             </div> <!-- / .col-lg-10 -->
206         </div> <!-- / .row -->
207     </div> <!-- / .container-fluid -->
208 </div> <!-- / .main -->
209
210 [% INCLUDE 'opac-bottom.inc' %]
211 [% BLOCK jsinclude %][% END %]