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

(-)a/C4/Reserves.pm (+1 lines)
Lines 1806-1811 sub _koha_notify_reserve { Link Here
1806
               ( $mtt eq 'email' and not $to_address ) # No email address
1806
               ( $mtt eq 'email' and not $to_address ) # No email address
1807
            or ( $mtt eq 'sms'   and not $patron->smsalertnumber ) # No SMS number
1807
            or ( $mtt eq 'sms'   and not $patron->smsalertnumber ) # No SMS number
1808
            or ( $mtt eq 'talkingtech' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl
1808
            or ( $mtt eq 'talkingtech' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl
1809
            or ( $mtt eq 'phone' and not $patron->phone ) # No phone number to call
1809
        );
1810
        );
1810
1811
1811
        &$send_notification($mtt, $letter_code);
1812
        &$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, 12345, "Description");
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
('talkingtech');
8
('talkingtech');
(-)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, 'talkingtech', 0, 'circulation', 'PREDUE'),
16
(2, 'talkingtech', 0, 'circulation', 'PREDUE'),
13
(2, 'talkingtech', 1, 'circulation', 'PREDUEDGST'),
17
(2, 'talkingtech', 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, 'talkingtech', 0, 'reserves',    'HOLD'),
21
(4, 'talkingtech', 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/sysprefs.sql (+1 lines)
Lines 640-645 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
640
('TagsShowOnDetail','10','','Number of tags to display on detail page.  0 is off.','Integer'),
640
('TagsShowOnDetail','10','','Number of tags to display on detail page.  0 is off.','Integer'),
641
('TagsShowOnList','6','','Number of tags to display on search results list.  0 is off.','Integer'),
641
('TagsShowOnList','6','','Number of tags to display on search results list.  0 is off.','Integer'),
642
('TalkingTechItivaPhoneNotification','0',NULL,'If ON, enables Talking Tech I-tiva phone notifications','YesNo'),
642
('TalkingTechItivaPhoneNotification','0',NULL,'If ON, enables Talking Tech I-tiva phone notifications','YesNo'),
643
('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'),
643
('template','prog','','Define the preferred staff interface template','Themes'),
644
('template','prog','','Define the preferred staff interface template','Themes'),
644
('ThingISBN','0','','Use with FRBRizeEditions. If ON, Koha will use the ThingISBN web service in the Editions tab on the detail pages.','YesNo'),
645
('ThingISBN','0','','Use with FRBRizeEditions. If ON, Koha will use the ThingISBN web service in the Editions tab on the detail pages.','YesNo'),
645
('TimeFormat','24hr','12hr|24hr','Defines the global time format for visual output.','Choice'),
646
('TimeFormat','24hr','12hr|24hr','Defines the global time format for visual output.','Choice'),
(-)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 105-110 Link Here
105
        [% ELSE %]
105
        [% ELSE %]
106
          <td>-</td>
106
          <td>-</td>
107
        [% END %]
107
        [% END %]
108
      [% ELSIF Koha.Preference('PhoneNotification') %]
109
        [% IF ( messaging_preference.transport_phone ) %]
110
          <td>
111
          [% IF ( messaging_form_inactive ) %]
112
              [% IF ( messaging_preference.transports_phone ) %]
113
                 <input type="checkbox"
114
                 id="phone[% messaging_preference.message_attribute_id | html %]"
115
                 name="[% messaging_preference.message_attribute_id | html %]"
116
                 value="phone" checked="checked" disabled="disabled" />
117
              [% ELSE %]
118
                 <input type="checkbox"
119
                 id="phone[% messaging_preference.message_attribute_id | html %]"
120
                 name="[% messaging_preference.message_attribute_id | html %]"
121
                 value="phone" disabled="disabled" />
122
              [% END %]
123
          [% ELSE %]
124
              [% IF ( messaging_preference.transports_phone ) %]
125
                 <input type="checkbox"
126
                 id="phone[% messaging_preference.message_attribute_id | html %]"
127
                 name="[% messaging_preference.message_attribute_id | html %]"
128
                 value="phone" checked="checked" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
129
              [% ELSE %]
130
                 <input type="checkbox"
131
                 id="phone[% messaging_preference.message_attribute_id | html %]"
132
                 name="[% messaging_preference.message_attribute_id | html %]"
133
                 value="phone" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
134
              [% END %]
135
          [% END %]
136
          </td>
137
        [% ELSE %]
138
          <td>-</td>
139
        [% END %]
108
      [% END %]
140
      [% END %]
109
141
110
      [% IF ( messaging_preference.transport_email ) %]
142
      [% IF ( messaging_preference.transport_email ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +8 lines)
Lines 149-154 Patrons: Link Here
149
               yes: Enable
149
               yes: Enable
150
               no: Disable
150
               no: Disable
151
         - patron phone notifications using Talking Tech i-tiva (overdues, predues and holds notices currently supported).
151
         - patron phone notifications using Talking Tech i-tiva (overdues, predues and holds notices currently supported).
152
         - <br/><i class="fa fa-exclamation-triangle"></i> If <code>TalkingTechItivaPhoneNotification</code> is enabled, <code>PhoneNotification</code> should be disabled.
153
     -
154
         - pref: PhoneNotification
155
           choices:
156
               yes: Enable
157
               no: Disable
158
         - patron phone notifications generation. A plugin will be required to process the phone notifications.
159
         - <br/><i class="fa fa-exclamation-triangle"></i> If <code>PhoneNotification</code> is enabled, <code>TalkingTechItivaPhoneNotification</code> should be disabled.
152
     -
160
     -
153
         - "Use the SMS::Send::"
161
         - "Use the SMS::Send::"
154
         - pref: SMSSendDriver
162
         - pref: SMSSendDriver
155
- 

Return to bug 25334