Bug 15344: Remove some other calls of GetMemberDetails from pl scripts
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-messaging.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>[% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your messaging settings</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% BLOCK cssinclude %][% END %]
6 </head>
7 [% INCLUDE 'bodytag.inc' bodyid='opac-messaging' %]
8 [% INCLUDE 'masthead.inc' %]
9
10 <div class="main">
11     <ul class="breadcrumb">
12         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
13         <li><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INFO.firstname %] [% BORROWER_INFO.surname %]</a> <span class="divider">&rsaquo;</span></li>
14         <li><a href="#">Your messaging settings</a></li>
15     </ul>
16
17     <div class="container-fluid">
18         <div class="row-fluid">
19             <div class="span2">
20                 <div id="navigation">
21                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
22                 </div>
23             </div>
24             <div class="span10">
25                 <div id="usermessaging">
26                     <h3>Your messaging settings</h3>
27                     [% IF ( settings_updated ) %]
28                         <div class="alert alert-success"><h4>Settings updated</h4></div>
29                     [% END %]
30                     <form action="/cgi-bin/koha/opac-messaging.pl" method="get" name="opacmessaging">
31                         <input type="hidden" name="modify" value="yes" />
32
33                             <table class="table table-bordered table-condensed table-striped">
34                                 <tr>
35                                     <th>&nbsp;</th>
36                                     <th>Days in advance</th>
37                                     [% IF ( SMSSendDriver ) %]<th>SMS</th>[% END %]
38                                     [% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]
39                                     <th>Email</th>
40                                     <th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="icon icon-info-sign"></i></th>
41                                     <!-- <th>RSS</th> --><th>Do not notify</th>
42                                 </tr>
43                                 [% FOREACH messaging_preference IN messaging_preferences %]
44                                     <tr>
45                                         <td>[% IF ( messaging_preference.Item_Due ) %]Item due
46                                               [% ELSIF ( messaging_preference.Advance_Notice ) %]Advance notice
47                                               [% ELSIF ( messaging_preference.Upcoming_Events ) %]Upcoming events
48                                               [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
49                                               [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
50                                               [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
51                                               [% ELSE %]Unknown [% END %]</td>
52                                         [% IF ( messaging_preference.takes_days ) %]
53                                             <td><select class="input-mini" name="[% messaging_preference.message_attribute_id %]-DAYS">
54                                             [% FOREACH select_day IN messaging_preference.select_days %]
55                                                 [% IF ( select_day.selected ) %]
56                                                     <option value="[% select_day.day %]" selected="selected">[% select_day.day %]</option>
57                                                 [% ELSE %]
58                                                     <option value="[% select_day.day %]">[% select_day.day %]</option>
59                                                 [% END %]
60                                             [% END %]
61                                             </select></td>
62                                         [% ELSE %]
63                                             <td>-</td>
64                                         [% END %]
65                                         [% IF ( messaging_preference.transport_sms ) %]
66                                             [% IF ( SMSSendDriver ) %]
67                                                 <td>
68                                                     [% IF ( messaging_preference.transports_sms ) %]
69                                                       <input type="checkbox" id="sms[% messaging_preference.message_attribute_id %]" name="[% messaging_preference.message_attribute_id %]" value="sms" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
70                                                     [% ELSE %]
71                                                         <input type="checkbox" id="sms[% messaging_preference.message_attribute_id %]" name="[% messaging_preference.message_attribute_id %]" value="sms" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
72                                                     [% END %]
73                                                 </td>
74                                             [% END %]
75                                         [% END %]
76                                         [% IF ( TalkingTechItivaPhone ) %]
77                                             <td>
78                                               [% IF ( messaging_preference.transports_phone ) %]
79                                               <input type="checkbox"
80                                                          id="phone[% messaging_preference.message_attribute_id %]"
81                                                          name="[% messaging_preference.message_attribute_id %]"
82                                                          value="phone" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
83                                               [% ELSE %]
84                                               <input type="checkbox"
85                                                          id="phone[% messaging_preference.message_attribute_id %]"
86                                                          name="[% messaging_preference.message_attribute_id %]"
87                                                          value="phone" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
88                                               [% END %]
89                                             </td>
90                                         [% END %]
91
92                                         [% IF ( messaging_preference.transport_email ) %]
93                                             <td>
94                                                 [% IF ( messaging_preference.transports_email ) %]
95                                                     <input type="checkbox" id="email[% messaging_preference.message_attribute_id %]" name="[% messaging_preference.message_attribute_id %]" value="email" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
96                                                 [% ELSE %]
97                                                     <input type="checkbox" id="email[% messaging_preference.message_attribute_id %]" name="[% messaging_preference.message_attribute_id %]" value="email" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
98                                                 [% END %]
99                                             </td>
100                                         [% ELSE %]
101                                             <td>-</td>
102                                         [% END %]
103
104                                         [% IF ( messaging_preference.has_digest ) %]
105                                             <td>
106                                                 [% IF ( messaging_preference.digest ) %]
107                                                     <input type="checkbox" id="digest[% messaging_preference.message_attribute_id %]" value="[% messaging_preference.message_attribute_id %]" name="digest" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
108                                                 [% ELSE %]
109                                                     <input type="checkbox" id="digest[% messaging_preference.message_attribute_id %]" value="[% messaging_preference.message_attribute_id %]" name="digest" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id %].checked=false;" />
110                                                 [% END %]
111                                             </td>
112                                         [% ELSE %]
113                                         <td>-</td>
114                                         [% END %]
115
116                                         <td><input type="checkbox" class="none" id="none[% messaging_preference.message_attribute_id %]" /></td>
117                                     </tr>
118                                 [% END # / FOREACH messaging_preferences%]
119                         </table>
120
121                         <fieldset class="rows">
122                         [% IF ( SMSSendDriver ) %]
123                             <ol><li><label for="SMSnumber">SMS number:</label> <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber %]" /></li></ol>
124                         [% END %]
125                         </fieldset>
126
127                         <fieldset class="action">
128                           <input type="submit" value="Submit changes" class="btn" /> <a class="cancel" href="/cgi-bin/koha/opac-user.pl">Cancel</a>
129                         </fieldset>
130                     </form>
131                 </div> <!-- / #usermessaging -->
132             </div> <!-- / .span10 -->
133         </div> <!-- / .row-fluid -->
134     </div> <!-- / .container-fluid -->
135 </div> <!-- / .main -->
136
137 [% INCLUDE 'opac-bottom.inc' %]
138 [% BLOCK jsinclude %]
139 <script type="text/javascript">//<![CDATA[
140   $(document).ready(function(){
141     $(".none").click(function(){
142       if($(this).attr("checked")){
143         var rowid = $(this).attr("id");
144         newid = Number(rowid.replace("none",""))
145           $("#sms"+newid).removeAttr("checked");
146           $("#email"+newid).removeAttr("checked");
147           $("#digest"+newid).removeAttr("checked");
148           $("#rss"+newid).removeAttr("checked");
149       }
150     });
151     $("#info_digests").tooltip();
152   });
153 //]]>
154 </script>
155 [% END %]