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