]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
LP#1715767: Allow others to use my account (privacy waiver)
[Evergreen.git] / Open-ILS / src / templates / opac / myopac / prefs_settings.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/org_selector.tt2";
3     WRAPPER "opac/parts/myopac/prefs_base.tt2";
4     myopac_page = "prefs";
5     prefs_page = 'prefs_settings' %]
6
7     <h3 class="sr-only">[% l('Search and History Preferences') %]</h3>
8
9     <form method='post'>
10
11        <table class="full-width data_grid" id="acct_search_main"
12             title="[% l('Search and History Preferences') %]">
13             <tbody>
14
15                 [% IF ctx.confirm_history_delete %]
16                 <tr><td colspan='2'>
17                   <div id='clear-history-confirm' class='renew-summary'>
18                   [% l('Disabling checkout or holds history will permanently remove all items from your history.') %]
19                   <br/>
20                   [% l('Are you sure you wish to continue?') %]
21                   </div>
22                   <a href="[% mkurl() %]">[% l('Cancel') %]</a>
23                   <input type='hidden' name='history_delete_confirmed' value='1'/>
24                   <input type="submit" value="[% l('Confirm') %]" class="opac-button"/>
25                 </td></tr>
26                 [% ELSIF ctx.updated_user_settings OR ctx.updated_waiver_entries %]
27                 <tr><td colspan='2'>
28                     <div class='renew-summary'>
29                         [% l('Account Successfully Updated') %]
30                     </div>
31                 </td></tr>
32                 [% END %]
33
34                 [%- setting = 'opac.hits_per_page' -%]
35                 <tr >
36                     <td width='20%'><label for='[% setting %]'>[% l("Search hits per page") %]</label></td>
37                     <td>
38                         <select id='[% setting %]' name='[% setting %]'>
39                             [%  UNLESS ctx.user_setting_map.$setting;
40                                     ctx.user_setting_map.$setting = 10;
41                                 END;
42                                 FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
43                                 <option value='[% val | uri %]' 
44                                     [% IF ctx.user_setting_map.$setting == val %]
45                                         selected='selected'[% END %]>[% val | html %]</option>
46                             [% END %]
47                         </select>
48                         <a href="#"><img alt="[% l('Search Hits Help') %]" 
49                             src="[% ctx.media_prefix %]/images/question-mark.png[% ctx.cache_key %]"
50                         /></a>
51                     </td>
52                 </tr>
53                 [%- setting = 'opac.default_search_location'; -%]
54                 <tr >
55                     <td width='20%'><label for='[% setting %]'>[% l("Preferred search location") %]</label></td>
56                     <td>
57                         [%- thang = ctx.user.home_ou.id;
58                             IF ctx.user_setting_map.$setting;
59                                 thang = ctx.user_setting_map.$setting;
60                             END;
61                             id = setting;
62                             INCLUDE build_org_selector name=setting value=thang;
63                         %]
64                     </td>
65                 </tr>
66                 [%- setting = 'opac.default_pickup_location'; -%]
67                 <tr>
68                     <td width='20%'><label for='[% setting %]'>[% l("Preferred pickup location") %]</label></td>
69                     <td>
70                         [%- thang = ctx.user.home_ou.id;
71                             IF ctx.user_setting_map.$setting;
72                                 thang = ctx.user_setting_map.$setting;
73                             END;
74                             id = setting;
75                             INCLUDE build_org_selector name=setting value=thang can_have_vols_only=1;
76                         %]
77                     </td>
78                 </tr>
79                 [%- setting = 'history.circ.retention_start' -%]
80                 <tr>
81                     [% circ_name = l('Keep history of checked out items?') %]
82                     <td><label for='[% setting %]'>[% circ_name%]</label></td>
83                     <td>
84                         <input id='[% setting %]' name='[% setting %]' 
85                             type="checkbox" title="[% circ_name %]"
86                             [% IF ctx.user_setting_map.$setting 
87                               AND !ctx.clear_circ_history; %] checked='checked' [% END %]/>
88                     </td>
89                 </tr>
90                 [%- setting = 'history.hold.retention_start' -%]
91                 <tr>
92                     [% hold_name =  l('Keep history of holds?') %]
93                     <td><label for='[% setting %]'>[% hold_name %]</label></td>
94                     <td>
95                         <input id='[% setting %]' name='[% setting %]' 
96                             type="checkbox" title="[% hold_name %]"
97                             [% IF ctx.user_setting_map.$setting
98                               AND !ctx.clear_hold_history; %] checked='checked' [% END %]/>
99                     </td>
100                 </tr>
101                 [%- setting = 'opac.temporary_list_no_warn' -%]
102                 <tr>
103                     [% skip_warn =  l('Skip warning when adding to temporary book list?') %]
104                     <td><label for='[% setting %]'>[% skip_warn %]</label></td>
105                     <td>
106                         <input id='[% setting %]' name='[% setting %]' 
107                             type="checkbox" title="[% skip_warn %]"
108                             [% IF ctx.user_setting_map.$setting %] checked='checked' [% END %]/>
109                     </td>
110                 </tr>
111                 [%- setting = 'circ.holds_behind_desk'; IF ctx.behind_desk_supported -%]
112                 <tr>
113                     [% behind_desk = l('Pickup holds from behind the desk when possible?') %]
114                     <td><label for='[% setting %]'>[% behind_desk %]</label></td>
115                     <td>
116                         <input id='[% setting %]' name='[% setting %]' 
117                             type="checkbox" title="[% behind_desk %]"
118                             [% IF ctx.user_setting_map.$setting %] checked='checked' [% END %]/>
119                     </td>
120                 </tr>
121                 [% END %]
122
123                 [%- IF ctx.get_org_setting(ctx.user.home_ou.id, 'circ.privacy_waiver'); %]
124                 <tr>
125                     <td>[% l('Allow others to use my account') %]</td>
126                     <td>
127                         [% FOR waiver IN ctx.user.waiver_entries %]
128                         <div id="waiver_[% waiver.id %]">
129                             <input type="hidden" name="waiver_id" value="[% waiver.id %]"/>
130                             [% l('Name:') %] <input type="textbox" name="waiver_name_[% waiver.id %]" value="[% waiver.name | html %]"/><br/>
131                             <label>
132                                 <input type="checkbox" name="waiver_place_holds" 
133                                     value="[% waiver.id %]" [% waiver.place_holds == 't' ? 'checked="checked"' : '' %]/>
134                                 [% l('Place Holds') %]
135                             </label>
136                             <label>
137                                 <input type="checkbox" name="waiver_pickup_holds"
138                                     value="[% waiver.id %]" [% waiver.pickup_holds == 't' ? 'checked="checked"' : '' %]/>
139                                 [% l('Pick Up Holds') %]
140                             </label>
141                             <label>
142                                 <input type="checkbox" name="waiver_checkout_items"
143                                     value="[% waiver.id %]" [% waiver.checkout_items == 't' ? 'checked="checked"' : '' %]/>
144                                 [% l('Check Out Items') %]
145                             </label>
146                             <label>
147                                 <input type="checkbox" name="waiver_view_history"
148                                     value="[% waiver.id %]" [% waiver.view_history == 't' ? 'checked="checked"' : '' %]/>
149                                 [% l('View Borrowing History') %]
150                             </label>
151                         </div>
152                         [% END %]
153                         <br/>
154                         <div>
155                             [% l('Name:') %] <input type="textbox" name="waiver_name_new"/><br/>
156                             <label><input type="checkbox" name="waiver_place_holds" value="new"/>[% l('Place Holds') %]</label>
157                             <label><input type="checkbox" name="waiver_pickup_holds" value="new"/>[% l('Pick Up Holds') %]</label>
158                             <label><input type="checkbox" name="waiver_checkout_items" value="new"/>[% l('Check Out Items') %]</label>
159                             <label><input type="checkbox" name="waiver_view_history" value="new"/>[% l('View Borrowing History') %]</label>
160                         </div>
161                     </td>
162                 </tr>
163                 [% END %]
164
165                 <!--
166                 <tr>
167                     <td><label for='prefs_def_font'>[% l("Default Font Size") %]</label></td>
168                     <td>
169                         <select id='prefs_def_font'>
170                             <option value='regular'>[% l("Regular Font") %]</option>
171                             <option value='large'>[% l("Large Font") %]</option>
172                         </select>
173                     </td>
174                 </tr>
175                 -->
176
177             </tbody>
178         </table>
179         [% IF !ctx.confirm_history_delete %]
180         <input type="submit" value="[% l('Save') %]" class="opac-button"/>
181         [% END %]
182     </form>
183     [% INCLUDE "opac/parts/myopac/prefs_hints.tt2" %]
184 [% END %]