followup to patch by Galen - add javascript to prevent premature submission of forms...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / messaging.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Patrons &rsaquo; <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">//<![CDATA[
5         $(document).ready(function(){
6                 $(".none").click(function(){
7                         if($(this).attr("checked")){
8                                 var rowid = $(this).attr("id");
9                                 newid = Number(rowid.replace("none","")) 
10                                 $("#sms"+newid).attr("checked","");
11                                 $("#email"+newid).attr("checked","");
12                                 $("#digest"+newid).attr("checked","");
13                                 $("#rss"+newid).attr("checked","");
14                         }
15                 });
16         });
17 //]]>
18 </script>
19 </head>
20 <body>
21 <!-- TMPL_INCLUDE NAME="header.inc" -->
22 <!-- TMPL_INCLUDE NAME="patron-search.inc" -->
23
24 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --> </div>
25
26 <div id="doc3" class="yui-t2">
27    
28    <div id="bd">
29         <div id="yui-main">
30         <div class="yui-b">
31 <!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
32 <!-- TMPL_IF NAME="error" -->
33 <div class="dialog alert">
34 <!-- TMPL_IF NAME="AUTH_UPDATE_FAILED" -->
35 <h3>Userid / Password update failed</h3>
36 <strong>Insufficient privileges.</strong>
37 <p>Other fields updated.</p>
38 <!-- /TMPL_IF -->
39 <!-- TMPL_IF NAME="CANT_DELETE_STAFF" -->
40 <h3>Unable to delete staff user</h3>
41 <p>Insufficient privileges.</p>
42 <!-- /TMPL_IF -->
43 <!-- TMPL_IF NAME="CANT_DELETE_OTHERLIBRARY" -->
44 <h3>Unable to delete patrons from other libraries with current settings</h3>
45 <p>Insufficient privileges.</p>
46 <!-- /TMPL_IF -->
47 <!-- TMPL_IF NAME="CANT_DELETE" -->
48 <h3>Unable to delete patron:</h3>
49 <p>Insufficient privileges.</p>
50 <!-- /TMPL_IF -->
51 </div>
52 <!-- /TMPL_IF -->
53 <div class="yui-g">
54 <!-- TMPL_IF NAME="unknowuser" -->
55    <div class="dialog message">
56          This patron does not exist.
57    </div>
58 <!-- TMPL_ELSE -->
59
60  <form method="get" name="messaging" action="/cgi-bin/koha/members/messaging.pl">
61
62 <input type="hidden" name="modify" value="yes" />
63 <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
64   <!-- TMPL_IF NAME= "settings_updated" -->
65   <div class="dialog message"><h4>Settings Updated</h4>
66     The patron settings have been updated</div>
67   <!-- /TMPL_IF -->
68  
69  <h3>Manage patron messaging settings</h3>
70
71   <table>
72     <tr><th></th><th>Days in advance</th><!-- TMPL_IF NAME="SMSSendDriver" --><th>SMS</th><!-- /TMPL_IF --><th>Email</th><th>Digests only?</th><!-- <th>RSS</th> --><th>Do not notify</th></tr>
73     <!-- TMPL_LOOP name="messaging_preferences" -->
74     <tr>
75       <td><!-- TMPL_VAR NAME="message_name" --></td>
76       <!-- TMPL_IF NAME="takes_days" -->
77       <td><select name="<!-- TMPL_VAR NAME="message_attribute_id" -->-DAYS">
78           <!-- TMPL_LOOP name="select_days" -->
79           <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="day" -->" selected="selected"><!-- TMPL_VAR NAME="day" --></option><!-- TMPL_ELSE -->
80           <option value="<!-- TMPL_VAR NAME="day" -->"><!-- TMPL_VAR NAME="day" --></option>
81       <!-- /TMPL_IF -->
82           <!-- /TMPL_LOOP -->
83         </select>
84       </td>
85       <!-- TMPL_ELSE -->
86       <td>-</td>
87       <!-- /TMPL_IF -->
88       <!-- TMPL_IF NAME="transport-sms" -->
89       <!-- TMPL_IF NAME="SMSSendDriver" --><td><input type="checkbox"
90                  id="sms<!-- TMPL_VAR NAME="message_attribute_id" -->"
91                  name="<!-- TMPL_VAR NAME="message_attribute_id" -->"
92                  value="sms" <!-- TMPL_VAR NAME="transport-sms"   --> onclick = "document.messaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" />
93       </td><!-- /TMPL_IF -->
94       <!-- TMPL_ELSE -->
95       <td>-</td>
96       <!-- /TMPL_IF -->
97
98       <!-- TMPL_IF NAME="transport-email" -->
99       <td><input type="checkbox"
100                  id="email<!-- TMPL_VAR NAME="message_attribute_id" -->"
101                  name="<!-- TMPL_VAR NAME="message_attribute_id" -->"
102                  value="email"   <!-- TMPL_VAR NAME="transport-email"   --> onclick = "document.messaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" />
103       </td>
104       <!-- TMPL_ELSE -->
105       <td>-</td>
106       <!-- /TMPL_IF -->
107
108       <!-- TMPL_IF NAME="has_digest" -->
109       <td><input type="checkbox"
110                  id="digest<!-- TMPL_VAR NAME="message_attribute_id" -->"
111                  value="<!-- TMPL_VAR NAME="message_attribute_id" -->"
112                  name="digest"   <!-- TMPL_VAR NAME="digest" --> onclick = "document.messaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" />
113       </td>
114       <!-- TMPL_ELSE -->
115       <td>-</td>
116       <!-- /TMPL_IF -->
117
118 <!--       <!-- TMPL_IF NAME="transport-rss" -->
119       <td><input type="checkbox"
120                  id="rss<!-- TMPL_VAR NAME="message_attribute_id" -->"
121                  name="<!-- TMPL_VAR NAME="message_attribute_id" -->"
122                  value="rss"  <!-- TMPL_VAR NAME="transport-rss"   --> onclick = "document.messaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" />
123       </td>
124       <!-- TMPL_ELSE -->
125       <td>-</td>
126       <!-- /TMPL_IF --> -->
127
128       <td><input type="checkbox" class="none" id="none<!-- TMPL_VAR NAME="message_attribute_id" -->" /></td>
129     </tr>
130     <!-- /TMPL_LOOP -->
131   </table>
132 <!-- TMPL_IF NAME="transport-sms" --><p><label for="SMSnumber">SMS number:</label> <input type="text" id="SMSnumber" name="SMSnumber" value="<!-- TMPL_VAR NAME="SMSnumber"  -->" /></p><!-- /TMPL_IF -->
133
134 <fieldset class="action">
135   <input type="submit" value="Submit Changes" /> <a class="cancel" href="/cgi-bin/koha/opac-user.pl">Cancel</a>
136 </fieldset>
137
138 <!-- TMPL_IF NAME="message_queue" -->
139 <table>
140   <caption>Message Queue</caption>
141   <tr><th>Type</th><th>Subject</th><th>Status</th><th>Time Prepared</th></tr>
142 <!-- TMPL_LOOP name="message_queue" -->
143   <tr><td><!-- TMPL_VAR NAME="message_transport_type" --></td><td><!-- TMPL_VAR NAME="subject" --></td><td><!-- TMPL_VAR NAME="status" --></td><td><!-- TMPL_VAR NAME="time_queued" --></td></tr>
144 <!-- /TMPL_LOOP -->
145 </table>
146 <!-- /TMPL_IF -->
147
148 </form>
149
150 </div>
151
152 <!-- /TMPL_IF --> <!-- unknowuser -->
153
154
155 </div>
156 </div>
157 <div class="yui-b">
158 <!-- TMPL_INCLUDE NAME="circ-menu.inc" -->
159 </div>
160 </div>
161 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->