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