]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
Let's inch towards valid XHTML by making POST and GET lowercase in our forms
[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             <tr>
23                 <td>[% l('Notify by Email by default when a hold is ready for pickup?') %]</td>
24                 <td>
25                     [% setting = 'opac.hold_notify' %]
26                     <input name='[% setting %].email' type="checkbox"
27                         [% IF (matches = ctx.user_setting_map.$setting.match('email')); %] checked='checked' [% END %]/>
28                 </td>
29             </tr>
30             <tr>
31                 <td>[% l('Notify by Phone by default when a hold is ready for pickup?') %]</td>
32                 <td>
33                     [% setting = 'opac.hold_notify' %]
34                     <input name='[% setting %].phone' type="checkbox"
35                         [% IF (matches = ctx.user_setting_map.$setting.match('phone')); %] checked='checked' [% END %]/>
36                 </td>
37             </tr>
38             <tr>
39                 <td>[% l('Default Phone Number') %]</td>
40                 <td>
41                     [% setting = 'opac.default_phone' %]
42                     <input name='[% setting %]' type="text"
43                         [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
44                 </td>
45             </tr>
46             [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
47             <tr>
48                 <td>[% l('Notify by Text by default when a hold is ready for pickup?') %]</td>
49                 <td>
50                     [% setting = 'opac.hold_notify' %]
51                     <input name='[% setting %].sms' type="checkbox"
52                         [% IF (matches = ctx.user_setting_map.$setting.match('sms')); %] checked='checked' [% END %]/>
53                 </td>
54             </tr>
55             <tr>
56                 <td>[% l('Default Mobile Carrier') %]</td>
57                 <td>[% INCLUDE "opac/parts/sms_carrier_selector.tt2" sms_carrier_hide_label="true" %]</td>
58             </tr>
59             <tr>
60                 <td>[% l('Default Mobile Number') %]</td>
61                 <td>
62                     [% setting = 'opac.default_sms_notify' %]
63                     <input name='[% setting %]' type="text"
64                         [% IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]' [% END %]/>
65                     [% l('Hint: use the full 10 digits of your phone #, no spaces, no dashes'); %]
66                 </td>
67             </tr>
68             [% END %]
69         </tbody>
70     </table>
71  
72     <table>
73         <thead><tr>
74             <th>[% l('Notification Type') %]</th>
75             <th>[% l('Enabled') %]</th>
76         </tr></thead>
77         <tbody class='data_grid'>
78             [% IF optin.size == 0 %]
79                 <strong>[% l('No notification preferences are configured') %]</strong>
80             [% END %]
81             [% FOR optin IN ctx.opt_in_settings %]
82                 <tr>
83                     <td>[% optin.cust.label | html %]</td>
84                     <td>
85                         <input type='checkbox' name='setting' 
86                             value='[% optin.cust.name | uri %]' 
87                             [% IF optin.value %] checked='checked' [% END %]/>
88                     </td>
89                 </tr>
90             [% END %]
91         </tbody>
92     </table>
93     <input type='submit' value="[% l('Save') %]" alt="[% l('Save') %]" class="opac-button" />
94 </form>
95 [% END %]
96
97