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