View | Details | Raw Unified | Return to bug 5501
Collapse All | Expand All

(-)a/installer/data/mysql/en/mandatory/message_transport_types.sql (+1 lines)
Lines 4-7 values Link Here
4
('email'),
4
('email'),
5
('print'),
5
('print'),
6
('sms'),
6
('sms'),
7
('none'),
7
('phone');
8
('phone');
(-)a/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql (-3 / +13 lines)
Lines 3-17 insert into `message_transports` Link Here
3
values
3
values
4
(1, 'email', 0, 'circulation', 'DUE'),
4
(1, 'email', 0, 'circulation', 'DUE'),
5
(1, 'email', 1, 'circulation', 'DUEDGST'),
5
(1, 'email', 1, 'circulation', 'DUEDGST'),
6
(2, 'email', 0, 'circulation', 'PREDUE'),
7
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
8
(4, 'email', 0, 'reserves',    'HOLD'),
9
(1, 'sms',   0, 'circulation', 'DUE'),
6
(1, 'sms',   0, 'circulation', 'DUE'),
10
(1, 'sms',   1, 'circulation', 'DUEDGST'),
7
(1, 'sms',   1, 'circulation', 'DUEDGST'),
8
(1, 'none',   0, 'circulation', 'DUE'),
9
(1, 'none',   1, 'circulation', 'DUEDGST'),
10
(1, 'print',   0, 'circulation', 'DUE'),
11
(1, 'print',   1, 'circulation', 'DUEDGST'),
12
(2, 'email', 0, 'circulation', 'PREDUE'),
13
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
11
(2, 'sms',   0, 'circulation', 'PREDUE'),
14
(2, 'sms',   0, 'circulation', 'PREDUE'),
12
(2, 'sms',   1, 'circulation', 'PREDUEDGST'),
15
(2, 'sms',   1, 'circulation', 'PREDUEDGST'),
16
(2, 'none',   0, 'circulation', 'PREDUE'),
17
(2, 'none',   1, 'circulation', 'PREDUEDGST'),
18
(4, 'email', 0, 'reserves',    'HOLD'),
13
(4, 'sms',   0, 'reserves',    'HOLD'),
19
(4, 'sms',   0, 'reserves',    'HOLD'),
20
(4, 'none',   0, 'reserves',    'HOLD'),
21
(4, 'print',   0, 'reserves',    'HOLD'),
14
(5, 'email', 0, 'circulation', 'CHECKIN'),
22
(5, 'email', 0, 'circulation', 'CHECKIN'),
15
(5, 'sms',   0, 'circulation', 'CHECKIN'),
23
(5, 'sms',   0, 'circulation', 'CHECKIN'),
24
(5, 'none',   0, 'circulation', 'CHECKIN'),
16
(6, 'email', 0, 'circulation', 'CHECKOUT'),
25
(6, 'email', 0, 'circulation', 'CHECKOUT'),
17
(6, 'sms',   0, 'circulation', 'CHECKOUT');
26
(6, 'sms',   0, 'circulation', 'CHECKOUT');
27
(6, 'none',   0, 'circulation', 'CHECKOUT');
(-)a/installer/data/mysql/updatedatabase.pl (+22 lines)
Lines 6773-6778 if ( CheckVersion($DBversion) ) { Link Here
6773
   SetVersion ($DBversion);
6773
   SetVersion ($DBversion);
6774
}
6774
}
6775
6775
6776
$DBversion = "3.19.XXX";
6777
if ( CheckVersion($DBversion) ) {
6778
    $dbh->do(q{ INSERT INTO message_transport_types VALUES ('none'); });
6779
    $dbh->do(q{
6780
                INSERT INTO `message_transports`
6781
                (`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
6782
                VALUES
6783
                (1, 'none',   0, 'circulation', 'DUE'),
6784
                (1, 'none',   1, 'circulation', 'DUEDGST'),
6785
                (1, 'print',   0, 'circulation', 'DUE'),
6786
                (1, 'print',   1, 'circulation', 'DUEDGST'),
6787
                (2, 'none',   0, 'circulation', 'PREDUE'),
6788
                (2, 'none',   1, 'circulation', 'PREDUEDGST'),
6789
                (4, 'none',   0, 'reserves',    'HOLD'),
6790
                (4, 'print',   0, 'reserves',    'HOLD'),
6791
                (5, 'none',   0, 'circulation', 'CHECKIN'),
6792
                (6, 'none',   0, 'circulation', 'CHECKOUT');
6793
              });
6794
    print "Upgrade to $DBversion done (Bug 5501 - Improve the 'do not notify' option)\n";
6795
    SetVersion ($DBversion);
6796
}
6797
6776
$DBversion = "3.11.00.203";
6798
$DBversion = "3.11.00.203";
6777
if ( CheckVersion($DBversion) ) {
6799
if ( CheckVersion($DBversion) ) {
6778
    $dbh->do(q{ALTER TABLE suggestions CHANGE COLUMN title title VARCHAR(255) DEFAULT NULL;});
6800
    $dbh->do(q{ALTER TABLE suggestions CHANGE COLUMN title title VARCHAR(255) DEFAULT NULL;});
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (-4 / +66 lines)
Lines 7-12 Link Here
7
				newid = Number(rowid.replace("none","")) 
7
				newid = Number(rowid.replace("none","")) 
8
          $("#sms"+newid).removeAttr("checked");
8
          $("#sms"+newid).removeAttr("checked");
9
          $("#email"+newid).removeAttr("checked");
9
          $("#email"+newid).removeAttr("checked");
10
          $("#print"+newid).removeAttr("checked");
10
          $("#phone"+newid).removeAttr("checked");
11
          $("#phone"+newid).removeAttr("checked");
11
          $("#digest"+newid).removeAttr("checked");
12
          $("#digest"+newid).removeAttr("checked");
12
          $("#rss"+newid).removeAttr("checked");
13
          $("#rss"+newid).removeAttr("checked");
Lines 23-31 Link Here
23
        <th>Days in advance</th>
24
        <th>Days in advance</th>
24
        [% IF ( SMSSendDriver ) %]<th>SMS</th>[% END %]
25
        [% IF ( SMSSendDriver ) %]<th>SMS</th>[% END %]
25
        [% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]
26
        [% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]
27
        <th>Print</th>
26
        <th>Email</th><th>Digests only?</th>
28
        <th>Email</th><th>Digests only?</th>
27
        <!-- <th>RSS</th> -->
29
        <!-- <th>RSS</th> -->
28
        [% UNLESS ( messaging_form_inactive ) %]<th>Do not notify</th>[% END %]
30
        <th>Do not notify</th>
29
    </tr>
31
    </tr>
30
    [% FOREACH messaging_preference IN messaging_preferences %]
32
    [% FOREACH messaging_preference IN messaging_preferences %]
31
    <tr>
33
    <tr>
Lines 110-115 Link Here
110
          [% END %]
112
          [% END %]
111
      </td>[% END %]
113
      </td>[% END %]
112
114
115
      [% IF ( messaging_preference.transport_print ) %]
116
      <td>
117
          [% IF ( messaging_form_inactive ) %]
118
              [% IF ( messaging_preference.transports_print ) %]
119
                <input type="checkbox"
120
                   id="print[% messaging_preference.message_attribute_id %]"
121
                   name="[% messaging_preference.message_attribute_id %]"
122
                   value="print" checked="checked" disabled="disabled" />
123
              [% ELSE %]
124
                <input type="checkbox"
125
                   id="print[% messaging_preference.message_attribute_id %]"
126
                   name="[% messaging_preference.message_attribute_id %]"
127
                   value="print" disabled="disabled" />
128
              [% END %]
129
          [% ELSE %]
130
              [% IF ( messaging_preference.transports_print ) %]
131
            <input type="checkbox"
132
                 id="print[% messaging_preference.message_attribute_id %]"
133
                 name="[% messaging_preference.message_attribute_id %]"
134
                 value="print" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
135
              [% ELSE %]
136
            <input type="checkbox"
137
                 id="print[% messaging_preference.message_attribute_id %]"
138
                 name="[% messaging_preference.message_attribute_id %]"
139
                 value="print" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" />
140
              [% END %]
141
          [% END %]
142
      </td>
143
      [% ELSE %]
144
      <td>-</td>
145
      [% END %]
146
113
      [% IF ( messaging_preference.transport_email ) %]
147
      [% IF ( messaging_preference.transport_email ) %]
114
      <td>
148
      <td>
115
          [% IF ( messaging_form_inactive ) %]
149
          [% IF ( messaging_form_inactive ) %]
Lines 192-200 Link Here
192
      <td>-</td>
226
      <td>-</td>
193
      [% END %] -->
227
      [% END %] -->
194
228
195
      [% UNLESS ( messaging_form_inactive ) %]
229
    [% IF ( messaging_preference.transport_none ) %]
196
      <td><input type="checkbox" class="none" id="none[% messaging_preference.message_attribute_id %]" /></td>
230
      <td>
231
          [% IF ( messaging_form_inactive ) %]
232
              [% IF ( messaging_preference.transports_none ) %]
233
                <input type="checkbox" class="none"
234
                   id="none[% messaging_preference.message_attribute_id %]"
235
                   name="[% messaging_preference.message_attribute_id %]"
236
                   value="none" checked="checked" disabled="disabled" />
237
              [% ELSE %]
238
                <input type="checkbox" class="none"
239
                   id="none[% messaging_preference.message_attribute_id %]"
240
                   name="[% messaging_preference.message_attribute_id %]"
241
                   value="none" disabled="disabled" />
242
              [% END %]
243
          [% ELSE %]
244
              [% IF ( messaging_preference.transports_none ) %]
245
            <input type="checkbox" class="none"
246
                 id="none[% messaging_preference.message_attribute_id %]"
247
                 name="[% messaging_preference.message_attribute_id %]"
248
                 value="none" checked="checked" />
249
              [% ELSE %]
250
            <input type="checkbox" class="none"
251
                 id="none[% messaging_preference.message_attribute_id %]"
252
                 name="[% messaging_preference.message_attribute_id %]"
253
                 value="none" />
254
              [% END %]
255
          [% END %]
256
      </td>
257
      [% ELSE %]
258
      <td>-</td>
197
      [% END %]
259
      [% END %]
260
198
    </tr>
261
    </tr>
199
    [% END %]
262
    [% END %]
200
  </table>
263
  </table>
201
- 

Return to bug 5501