1 [% PROCESS "opac/parts/header.tt2";
2 WRAPPER "opac/parts/myopac/prefs_base.tt2";
4 prefs_page = 'prefs_notify' %]
7 [% setting = 'opac.hold_notify' %]
8 <input name='[% setting %]' type="hidden"
9 [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
11 <table class="full-width data_grid" id="acct_search_main"
12 title="[% l('Search Preferences') %]">
15 [% IF ctx.updated_user_settings %]
17 <div class='renew-summary'>
18 [% l('Account Successfully Updated') %]
23 [% setting = 'opac.hold_notify' %]
25 [%# WCAG insists that labels for checkboxes contain the input
26 or directly follow the input, which would not look right
27 with the rest of the table. As an alternative, we can
28 repeat the label as a title attr.
29 http://www.w3.org/TR/WCAG20-TECHS/H44.html %]
30 [% email_label = l('Notify by Email by default when a hold is ready for pickup?') %]
32 <td><label for='[% setting %].email'>[% email_label %]</label></td>
34 <input id='[% setting %].email' name='[% setting %].email'
35 type="checkbox" title="[% email_label %]"
36 [% IF (matches = ctx.user_setting_map.$setting.match('email')); %] checked='checked' [% END %]/>
39 [%- IF allow_phone_notifications == 'true';
40 setting = 'opac.hold_notify';
43 [% phone_label = l('Notify by Phone by default when a hold is ready for pickup?') %]
44 <td><label for='[% setting %].phone'>[% phone_label %]</label></td>
46 <input id='[% setting %].phone' name='[% setting %].phone'
47 type="checkbox" title="[% phone_label %]"
48 [% IF (matches = ctx.user_setting_map.$setting.match('phone')); %] checked='checked' [% END %]/>
51 [% setting = 'opac.default_phone' %]
53 <td><label for='[% setting %]'>[% l('Default Phone Number') %]</label></td>
55 <input id='[% setting %]' name='[% setting %]' type="text"
56 [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
60 [%- IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1;
61 setting = 'opac.hold_notify';
64 [% sms_label = l('Notify by Text by default when a hold is ready for pickup?') %]
65 <td><label for='[% setting %].sms'>[% sms_label %]</label></td>
67 <input id='[% setting %].sms' name='[% setting %].sms'
68 type="checkbox" title="[% sms_label %]"
69 [% IF (matches = ctx.user_setting_map.$setting.match('sms')); %] checked='checked' [% END %]/>
73 <td>[% l('Default Mobile Carrier') %]</td>
74 <td>[% INCLUDE "opac/parts/sms_carrier_selector.tt2" sms_carrier_hide_label="true" %]</td>
76 [% setting = 'opac.default_sms_notify' %]
78 <td><label for='[% setting %]'>[% l('Default Mobile Number') %]</label></td>
80 <input id='[% setting %]' name='[% setting %]' type="text"
81 [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
82 [% l('Hint: use the full 10 digits of your phone #, no spaces, no dashes'); %]
89 [% IF ctx.opt_in_settings.size > 0 %]
90 <div class='user_opt_in_settings'>
93 <th>[% l('Notification Type') %]</th>
94 <th>[% l('Enabled') %]</th>
96 <tbody class='data_grid'>
97 [% FOR optin IN ctx.opt_in_settings %]
99 <td>[% optin.cust.label | html %]</td>
101 <input type='checkbox' name='setting'
102 value='[% optin.cust.name | uri %]'
103 title="[% optin.cust.label | html %]"
104 [% IF optin.value %] checked='checked' [% END %]/>
112 <input type='submit' value="[% l('Save') %]" class="opac-button" />