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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (+65 lines)
Lines 11-16 Link Here
11
            [% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %]
11
            [% IF Koha.Preference('SMSSendDriver') %]<th>SMS</th>[% END %]
12
            [% IF Koha.Preference('TalkingTechItivaPhoneNotification') || Koha.Preference('PhoneNotification') %]<th>Phone</th>[% END %]
12
            [% IF Koha.Preference('TalkingTechItivaPhoneNotification') || Koha.Preference('PhoneNotification') %]<th>Phone</th>[% END %]
13
            <th>Email</th>
13
            <th>Email</th>
14
            [% SET has_print_transport = 0 %]
15
            [% FOREACH pref IN messaging_preferences %]
16
                [% IF pref.transport_print %][% SET has_print_transport = 1 %][% LAST %][% END %]
17
            [% END %]
18
            [% IF has_print_transport %]
19
                <th>
20
                    Print
21
                    [% IF patron.category.print_notice_charge > 0 %]
22
                        ([% patron.category.print_notice_charge | $Price %] charge)
23
                    [% END %]
24
                </th>
25
            [% END %]
14
            <th
26
            <th
15
                >Digests only
27
                >Digests only
16
                <i id="info_digests" data-bs-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-bs-placement="right" class="fa fa-info-circle"></i
28
                <i id="info_digests" data-bs-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-bs-placement="right" class="fa fa-info-circle"></i
Lines 249-254 Link Here
249
                    <td>-</td>
261
                    <td>-</td>
250
                [% END %]
262
                [% END %]
251
263
264
                [% IF has_print_transport %]
265
                    [% IF ( messaging_preference.transport_print ) %]
266
                        <td>
267
                            [% IF ( messaging_form_inactive ) %]
268
                                [% IF ( messaging_preference.transports_print ) %]
269
                                    <input
270
                                        type="checkbox"
271
                                        id="print[% messaging_preference.message_attribute_id | html %]"
272
                                        name="[% messaging_preference.message_attribute_id | html %]"
273
                                        value="print"
274
                                        class="pmp_print"
275
                                        checked="checked"
276
                                        disabled="disabled"
277
                                    />
278
                                [% ELSE %]
279
                                    <input type="checkbox" id="print[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="print" class="pmp_print" disabled="disabled" />
280
                                [% END %]
281
                            [% ELSE %]
282
                                [% IF patron.category.print_notice_charge > 0 %]
283
                                    <div class="print-notice-warning">
284
                                        <small class="text-warning">
285
                                            <i class="fa fa-exclamation-triangle"></i>
286
                                            [% patron.category.print_notice_charge | $Price %] charge per notice
287
                                        </small>
288
                                    </div>
289
                                [% END %]
290
                                [% IF ( messaging_preference.transports_print ) %]
291
                                    <input
292
                                        type="checkbox"
293
                                        id="print[% messaging_preference.message_attribute_id | html %]"
294
                                        name="[% messaging_preference.message_attribute_id | html %]"
295
                                        value="print"
296
                                        checked="checked"
297
                                        class="pmp_print active_notify"
298
                                        data-attr-id="[% messaging_preference.message_attribute_id | html %]"
299
                                    />
300
                                [% ELSE %]
301
                                    <input
302
                                        type="checkbox"
303
                                        id="print[% messaging_preference.message_attribute_id | html %]"
304
                                        name="[% messaging_preference.message_attribute_id | html %]"
305
                                        value="print"
306
                                        class="pmp_print active_notify"
307
                                        data-attr-id="[% messaging_preference.message_attribute_id | html %]"
308
                                    />
309
                                [% END %]
310
                            [% END %]
311
                        </td>
312
                    [% ELSE %]
313
                        <td>-</td>
314
                    [% END %]
315
                [% END %]
316
252
                [% IF ( messaging_preference.has_digest ) %]
317
                [% IF ( messaging_preference.has_digest ) %]
253
                    <td>
318
                    <td>
254
                        [% IF ( messaging_form_inactive ) %]
319
                        [% IF ( messaging_form_inactive ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+9 lines)
Lines 4-9 Link Here
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE Price %]
7
[% PROCESS 'member-main-address-style.inc' %]
8
[% PROCESS 'member-main-address-style.inc' %]
8
[% PROCESS 'member-alt-address-style.inc' %]
9
[% PROCESS 'member-alt-address-style.inc' %]
9
[% PROCESS 'member-alt-contact-style.inc' %]
10
[% PROCESS 'member-alt-contact-style.inc' %]
Lines 1599-1604 Link Here
1599
                                        <i class="fa fa-caret-down" aria-hidden="true"></i>
1600
                                        <i class="fa fa-caret-down" aria-hidden="true"></i>
1600
                                        Patron messaging preferences
1601
                                        Patron messaging preferences
1601
                                    </legend>
1602
                                    </legend>
1603
                                    [% IF print_notice_charging && !patron_has_email %]
1604
                                        <div class="alert alert-warning">
1605
                                            <i class="fa fa-exclamation-triangle"></i>
1606
                                            <strong>Notice:</strong> This patron has no email address.
1607
                                            Print notices will incur a charge of [% print_notice_charge_amount | $Price %] each.
1608
                                            Consider encouraging the patron to provide an email address to avoid these charges.
1609
                                        </div>
1610
                                    [% END %]
1602
                                    <div class="messaging_prefs">
1611
                                    <div class="messaging_prefs">
1603
                                        <div id="messaging_prefs_loading" class="form-message" style="display:none"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults </div>
1612
                                        <div id="messaging_prefs_loading" class="form-message" style="display:none"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults </div>
1604
                                        <input type="hidden" name="setting_messaging_prefs" value="1" />
1613
                                        <input type="hidden" name="setting_messaging_prefs" value="1" />
(-)a/members/memberentry.pl (-1 / +10 lines)
Lines 855-860 if ( C4::Context->preference('EnhancedMessagingPreferences') ) { Link Here
855
    $template->param( SMSSendDriver         => C4::Context->preference("SMSSendDriver") );
855
    $template->param( SMSSendDriver         => C4::Context->preference("SMSSendDriver") );
856
    $template->param( SMSnumber             => $data{'smsalertnumber'} );
856
    $template->param( SMSnumber             => $data{'smsalertnumber'} );
857
    $template->param( TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") );
857
    $template->param( TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") );
858
 
859
    # Print notice charging context - category-based
860
    if ($patron && $patron->category && $patron->category->print_notice_charge > 0) {
861
        $template->param(
862
            print_notice_charging => 1,
863
            print_notice_charge_amount => $patron->category->print_notice_charge,
864
            patron_has_email => $patron->notice_email_address,
865
        );
866
    }
867
858
}
868
}
859
869
860
$template->param( borrower_data    => \%data );
870
$template->param( borrower_data    => \%data );
861
- 

Return to bug 4858