]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/hold_notify.tt2
LP#1570072: update hold notification methods upon preference changes
[Evergreen.git] / Open-ILS / src / templates / opac / parts / hold_notify.tt2
1 [% BLOCK get_hold_notify %]
2     [% # get hash of sms carriers keyed by id:
3         temp = ctx.search_csc('active','t');
4         tcos = { '0' => 'None' };
5         FOR o IN temp;
6             id = o.id;
7             tcos.$id = o;
8         END;
9     %]
10     [% SET any_notify = 0 %]
11     <div>
12     [% IF h.email_notify == 't' %]
13         [% any_notify = 1 %]
14         <strong>[% l("Email") %]</strong>: [% l("Yes") %]<br/>
15     [% END %]
16     [% IF h.phone_notify %]
17         [% any_notify = 1 %]
18         <strong>[% l("Phone") %]</strong>: [% h.phone_notify | html %]<br/>
19     [% END %]
20     [% IF h.sms_notify %]
21         [% any_notify = 1, cid = h.sms_carrier; %]
22         <strong>[% l("SMS") %]</strong>: [% h.sms_notify | html %] ([% tcos.$cid.name() | html %])<br/>
23     [% END %]
24     [% UNLESS any_notify %]
25         <span style="color:red">[% l("None") %]</span>
26     [% END %]
27     </div>
28 [% END %]