]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
TPAC: Address severe accessibility issues
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / prefs_notify.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     WRAPPER "opac/parts/myopac/prefs_base.tt2";
3     myopac_page = "prefs";
4     prefs_page = 'notify' %]
5
6 <form method='post'>
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 %]/>
10
11     <table class="full-width data_grid" id="acct_search_main">
12         <tbody>
13
14             [% IF ctx.updated_user_settings %]
15             <tr><td colspan='2'>
16                 <div class='renew-summary'>
17                     [% l('Account Successfully Updated') %]
18                 </div>
19             </td></tr>
20             [% END %]
21
22             [% setting = 'opac.hold_notify' %]
23             <tr>
24                 <td><label for='[% setting %].email'>[%
25                     l('Notify by Email by default when a hold is ready for pickup?')
26                 %]</label></td>
27                 <td>
28                     <input id='[% setting %].email' name='[% setting %].email' type="checkbox"
29                         [% IF (matches = ctx.user_setting_map.$setting.match('email')); %] checked='checked' [% END %]/>
30                 </td>
31             </tr>
32             [%- IF allow_phone_notifications == 'true';
33                 setting = 'opac.hold_notify'; 
34             -%]
35             <tr>
36                 <td><label for='[% setting %].phone'>[%
37                     l('Notify by Phone by default when a hold is ready for pickup?')
38                 %]</label></td>
39                 <td>
40                     <input id='[% setting %].phone' name='[% setting %].phone' type="checkbox"
41                         [% IF (matches = ctx.user_setting_map.$setting.match('phone')); %] checked='checked' [% END %]/>
42                 </td>
43             </tr>
44             [% setting = 'opac.default_phone' %]
45             <tr>
46                 <td><label for='[% setting %]'>[% l('Default Phone Number') %]</label></td>
47                 <td>
48                     <input id='[% setting %]' name='[% setting %]' type="text"
49                         [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
50                 </td>
51             </tr>
52             [%- END %]
53             [%- IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1;
54                setting = 'opac.hold_notify';
55             -%]
56             <tr>
57                 <td><label for='[% setting %].sms'>[%
58                     l('Notify by Text by default when a hold is ready for pickup?')
59                 %]</label></td>
60                 <td>
61                     <input id='[% setting %].sms' name='[% setting %].sms' type="checkbox"
62                         [% IF (matches = ctx.user_setting_map.$setting.match('sms')); %] checked='checked' [% END %]/>
63                 </td>
64             </tr>
65             <tr>
66                 <td>[% l('Default Mobile Carrier') %]</td>
67                 <td>[% INCLUDE "opac/parts/sms_carrier_selector.tt2" sms_carrier_hide_label="true" %]</td>
68             </tr>
69             [% setting = 'opac.default_sms_notify' %]
70             <tr>
71                 <td><label for='[% setting %]'>[% l('Default Mobile Number') %]</label></td>
72                 <td>
73                     <input id='[% setting %]' name='[% setting %]' type="text"
74                         [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
75                     [% l('Hint: use the full 10 digits of your phone #, no spaces, no dashes'); %]
76                 </td>
77             </tr>
78             [% END %]
79         </tbody>
80     </table>
81  
82     <table>
83         <thead><tr>
84             <th>[% l('Notification Type') %]</th>
85             <th>[% l('Enabled') %]</th>
86         </tr></thead>
87         <tbody class='data_grid'>
88             [% IF optin.size == 0 %]
89                 <strong>[% l('No notification preferences are configured') %]</strong>
90             [% END %]
91             [% FOR optin IN ctx.opt_in_settings %]
92                 <tr>
93                     <td>[% optin.cust.label | html %]</td>
94                     <td>
95                         <input type='checkbox' name='setting' 
96                             value='[% optin.cust.name | uri %]' 
97                             [% IF optin.value %] checked='checked' [% END %]/>
98                     </td>
99                 </tr>
100             [% END %]
101         </tbody>
102     </table>
103     <input type='submit' value="[% l('Save') %]" alt="[% l('Save') %]" class="opac-button" />
104 </form>
105 [% END %]
106
107