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

(-)a/C4/Reserves.pm (+1 lines)
Lines 1854-1859 sub _koha_notify_reserve { Link Here
1854
               ( $mtt eq 'email' and not $to_address ) # No email address
1854
               ( $mtt eq 'email' and not $to_address ) # No email address
1855
            or ( $mtt eq 'sms'   and not $patron->smsalertnumber ) # No SMS number
1855
            or ( $mtt eq 'sms'   and not $patron->smsalertnumber ) # No SMS number
1856
            or ( $mtt eq 'itiva' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl
1856
            or ( $mtt eq 'itiva' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl
1857
            or ( $mtt eq 'phone' and not $patron->phone ) # No phone number to call
1857
        );
1858
        );
1858
1859
1859
        &$send_notification($mtt, $letter_code);
1860
        &$send_notification($mtt, $letter_code);
(-)a/installer/data/mysql/atomicupdate/bug_25334.perl (+27 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
5
        ('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo')
6
    });
7
8
    $dbh->do(q{
9
        INSERT INTO message_transport_types (message_transport_type) VALUES ('phone')
10
    });
11
12
    $dbh->do(q{
13
        INSERT IGNORE INTO `message_transports`
14
        (`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
15
        VALUES
16
        (1, 'phone',       0, 'circulation', 'DUE'),
17
        (1, 'phone',       1, 'circulation', 'DUEDGST'),
18
        (2, 'phone',       0, 'circulation', 'PREDUE'),
19
        (2, 'phone',       1, 'circulation', 'PREDUEDGST'),
20
        (4, 'phone',       0, 'reserves',    'HOLD'),
21
        (5, 'phone',       0, 'circulation', 'CHECKIN'),
22
        (6, 'phone',       0, 'circulation', 'CHECKOUT');
23
    });
24
25
    # Always end with this (adjust the bug info)
26
    NewVersion( $DBversion, 25334, "Add generic 'phone' message transport type");
27
}
(-)a/installer/data/mysql/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
('phone'),
7
('itiva');
8
('itiva');
(-)a/installer/data/mysql/mandatory/sample_notices_message_transports.sql (-1 / +8 lines)
Lines 5-20 values Link Here
5
(1, 'email', 1, 'circulation', 'DUEDGST'),
5
(1, 'email', 1, 'circulation', 'DUEDGST'),
6
(1, 'sms',   0, 'circulation', 'DUE'),
6
(1, 'sms',   0, 'circulation', 'DUE'),
7
(1, 'sms',   1, 'circulation', 'DUEDGST'),
7
(1, 'sms',   1, 'circulation', 'DUEDGST'),
8
(1, 'phone', 0, 'circulation', 'DUE'),
9
(1, 'phone', 1, 'circulation', 'DUEDGST'),
8
(2, 'email', 0, 'circulation', 'PREDUE'),
10
(2, 'email', 0, 'circulation', 'PREDUE'),
9
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
11
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
10
(2, 'sms',   0, 'circulation', 'PREDUE'),
12
(2, 'sms',   0, 'circulation', 'PREDUE'),
11
(2, 'sms',   1, 'circulation', 'PREDUEDGST'),
13
(2, 'sms',   1, 'circulation', 'PREDUEDGST'),
14
(2, 'phone', 0, 'circulation', 'PREDUE'),
15
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
12
(2, 'itiva', 0, 'circulation', 'PREDUE'),
16
(2, 'itiva', 0, 'circulation', 'PREDUE'),
13
(2, 'itiva', 1, 'circulation', 'PREDUEDGST'),
17
(2, 'itiva', 1, 'circulation', 'PREDUEDGST'),
14
(4, 'email', 0, 'reserves',    'HOLD'),
18
(4, 'email', 0, 'reserves',    'HOLD'),
15
(4, 'sms',   0, 'reserves',    'HOLD'),
19
(4, 'sms',   0, 'reserves',    'HOLD'),
20
(4, 'phone', 0, 'reserves',    'HOLD'),
16
(4, 'itiva', 0, 'reserves',    'HOLD'),
21
(4, 'itiva', 0, 'reserves',    'HOLD'),
17
(5, 'email', 0, 'circulation', 'CHECKIN'),
22
(5, 'email', 0, 'circulation', 'CHECKIN'),
18
(5, 'sms',   0, 'circulation', 'CHECKIN'),
23
(5, 'sms',   0, 'circulation', 'CHECKIN'),
24
(5, 'phone', 0, 'circulation', 'CHECKIN'),
19
(6, 'email', 0, 'circulation', 'CHECKOUT'),
25
(6, 'email', 0, 'circulation', 'CHECKOUT'),
20
(6, 'sms',   0, 'circulation', 'CHECKOUT');
26
(6, 'sms',   0, 'circulation', 'CHECKOUT'),
27
(6, 'phone', 0, 'circulation', 'CHECKOUT');
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 516-521 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
516
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
516
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
517
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
517
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
518
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
518
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
519
('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'),
519
('PrefillGuaranteeField', 'phone,email,streetnumber,address,city,state,zipcode,country', NULL, 'Prefill these fields in guarantee member entry form from guarantor patron record', 'Multiple'),
520
('PrefillGuaranteeField', 'phone,email,streetnumber,address,city,state,zipcode,country', NULL, 'Prefill these fields in guarantee member entry form from guarantor patron record', 'Multiple'),
520
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
521
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
521
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
522
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (-1 / +33 lines)
Lines 7-13 Link Here
7
    <tr><th></th>
7
    <tr><th></th>
8
        <th>Days in advance</th>
8
        <th>Days in advance</th>
9
        [% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %]
9
        [% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %]
10
        [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]<th>Phone</th>[% END %]
10
        [% IF Koha.Preference('TalkingTechItivaPhoneNotification') || Koha.Preference('PhoneNotification') %]<th>Phone</th>[% END %]
11
        <th>Email</th>
11
        <th>Email</th>
12
        <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="fa fa-info-circle"></i></th>
12
        <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="fa fa-info-circle"></i></th>
13
        <!-- <th>RSS</th> -->
13
        <!-- <th>RSS</th> -->
Lines 110-115 Link Here
110
        [% ELSE %]
110
        [% ELSE %]
111
          <td>-</td>
111
          <td>-</td>
112
        [% END %]
112
        [% END %]
113
      [% ELSIF Koha.Preference('PhoneNotification') %]
114
        [% IF ( messaging_preference.transport_phone ) %]
115
          <td>
116
          [% IF ( messaging_form_inactive ) %]
117
              [% IF ( messaging_preference.transports_phone ) %]
118
                 <input type="checkbox"
119
                 id="phone[% messaging_preference.message_attribute_id | html %]"
120
                 name="[% messaging_preference.message_attribute_id | html %]"
121
                 value="phone" checked="checked" disabled="disabled" />
122
              [% ELSE %]
123
                 <input type="checkbox"
124
                 id="phone[% messaging_preference.message_attribute_id | html %]"
125
                 name="[% messaging_preference.message_attribute_id | html %]"
126
                 value="phone" disabled="disabled" />
127
              [% END %]
128
          [% ELSE %]
129
              [% IF ( messaging_preference.transports_phone ) %]
130
                 <input type="checkbox"
131
                 id="phone[% messaging_preference.message_attribute_id | html %]"
132
                 name="[% messaging_preference.message_attribute_id | html %]"
133
                 value="phone" checked="checked" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
134
              [% ELSE %]
135
                 <input type="checkbox"
136
                 id="phone[% messaging_preference.message_attribute_id | html %]"
137
                 name="[% messaging_preference.message_attribute_id | html %]"
138
                 value="phone" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
139
              [% END %]
140
          [% END %]
141
          </td>
142
        [% ELSE %]
143
          <td>-</td>
144
        [% END %]
113
      [% END %]
145
      [% END %]
114
146
115
      [% IF ( messaging_preference.transport_email ) %]
147
      [% IF ( messaging_preference.transport_email ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+8 lines)
Lines 158-163 Patrons: Link Here
158
               yes: Enable
158
               yes: Enable
159
               no: Disable
159
               no: Disable
160
         - patron phone notifications using Talking Tech i-tiva (overdues, predues and holds notices currently supported).
160
         - patron phone notifications using Talking Tech i-tiva (overdues, predues and holds notices currently supported).
161
         - <br/><i class="fa fa-exclamation-triangle"></i> If <code>TalkingTechItivaPhoneNotification</code> is enabled, <code>PhoneNotification</code> should be disabled.
162
     -
163
         - pref: PhoneNotification
164
           choices:
165
               yes: Enable
166
               no: Disable
167
         - patron phone notifications generation. A plugin will be required to process the phone notifications.
168
         - <br/><i class="fa fa-exclamation-triangle"></i> If <code>PhoneNotification</code> is enabled, <code>TalkingTechItivaPhoneNotification</code> should be disabled.
161
     -
169
     -
162
         - "Use the SMS::Send::"
170
         - "Use the SMS::Send::"
163
         - pref: SMSSendDriver
171
         - pref: SMSSendDriver
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-5 / +5 lines)
Lines 394-399 Link Here
394
                            <div class="transport-types" style="clear:both">
394
                            <div class="transport-types" style="clear:both">
395
                                [% FOR mtt IN letters.$lang.templates.keys.sort %]
395
                                [% FOR mtt IN letters.$lang.templates.keys.sort %]
396
                                    [% SET letter = letters.$lang.templates.$mtt %]
396
                                    [% SET letter = letters.$lang.templates.$mtt %]
397
                                    [% NEXT IF letter.message_transport_type == "talkingtech" && !Koha.Preference('TalkingTechItivaPhoneNotification') %]
398
                                    [% NEXT IF letter.message_transport_type == "phone" && !Koha.Preference('PhoneNotification') %]
397
                                    <h3>
399
                                    <h3>
398
                                        [% SWITCH letter.message_transport_type %]
400
                                        [% SWITCH letter.message_transport_type %]
399
                                            [% CASE 'email' %]
401
                                            [% CASE 'email' %]
Lines 405-411 Link Here
405
                                            [% CASE 'feed' %]
407
                                            [% CASE 'feed' %]
406
                                              Feed
408
                                              Feed
407
                                            [% CASE 'itiva' %]
409
                                            [% CASE 'itiva' %]
408
                                              Phone
410
                                              Phone ( Itiva )
411
                                            [% CASE 'phone' %]
412
                                                Phone
409
                                            [% CASE %]
413
                                            [% CASE %]
410
                                              [% letter.message_transport_type | html %]
414
                                              [% letter.message_transport_type | html %]
411
                                        [% END %]
415
                                        [% END %]
Lines 413-421 Link Here
413
                                    [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %]
417
                                    [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %]
414
                                        <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
418
                                        <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
415
                                            <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div>
419
                                            <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div>
416
                                    [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
417
                                        <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
418
                                            <div class="dialog message">You should enable the TalkingTechItivaPhoneNotification preference to use the phone templates.</div>
419
                                    [% ELSE %]
420
                                    [% ELSE %]
420
                                        <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]">
421
                                        <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]">
421
                                    [% END %]
422
                                    [% END %]
422
- 

Return to bug 25334