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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-4 / +10 lines)
Lines 108-120 Link Here
108
                                                    <td class="selectcol">
108
                                                    <td class="selectcol">
109
                                                        [% IF ( messaging_preference.transports_phone ) %]
109
                                                        [% IF ( messaging_preference.transports_phone ) %]
110
                                                            <input type="checkbox"
110
                                                            <input type="checkbox"
111
                                                                   class="phone"
111
                                                                   class="pmp_phone"
112
                                                                   id="phone[% messaging_preference.message_attribute_id | html %]"
112
                                                                   id="phone[% messaging_preference.message_attribute_id | html %]"
113
                                                                   name="[% messaging_preference.message_attribute_id | html %]"
113
                                                                   name="[% messaging_preference.message_attribute_id | html %]"
114
                                                                   value="phone" checked="checked" />
114
                                                                   value="phone" checked="checked" />
115
                                                        [% ELSE %]
115
                                                        [% ELSE %]
116
                                                            <input type="checkbox"
116
                                                            <input type="checkbox"
117
                                                                   class="phone"
117
                                                                   class="pmp_phone"
118
                                                                   id="phone[% messaging_preference.message_attribute_id | html %]"
118
                                                                   id="phone[% messaging_preference.message_attribute_id | html %]"
119
                                                                   name="[% messaging_preference.message_attribute_id | html %]"
119
                                                                   name="[% messaging_preference.message_attribute_id | html %]"
120
                                                                   value="phone" />
120
                                                                   value="phone" />
Lines 256-262 Link Here
256
            $("#info_digests").tooltip();
256
            $("#info_digests").tooltip();
257
257
258
            function toggle_digest(id){
258
            function toggle_digest(id){
259
                if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) {
259
                let PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
260
                let TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
261
                let phone_checked = TalkingTechItivaPhoneNotification ? false : PhoneNotification ? $("#phone"+id).prop("checked") : false;
262
263
                if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") || phone_checked ) {
260
                    $("#digest"+id).attr("disabled", false).tooltip('disable');
264
                    $("#digest"+id).attr("disabled", false).tooltip('disable');
261
                } else {
265
                } else {
262
                    $("#digest"+id).attr("disabled", true).prop("checked",false).tooltip('enable');
266
                    $("#digest"+id).attr("disabled", true).prop("checked",false).tooltip('enable');
Lines 275-280 Link Here
275
            $(".pmp_sms").click(function(){
279
            $(".pmp_sms").click(function(){
276
                toggle_digest(Number($(this).attr("id").replace("sms", "")));
280
                toggle_digest(Number($(this).attr("id").replace("sms", "")));
277
            });
281
            });
282
            $(".pmp_phone").click(function(){
283
                toggle_digest(Number($(this).attr("id").replace("phone", "")));
284
            });
278
285
279
        });
286
        });
280
287
281
- 

Return to bug 31166