diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
index accdad7c19..0638545742 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
@@ -1,6 +1,10 @@
[% USE Koha %]
+
@@ -109,12 +113,12 @@
+ value="itiva" checked="checked" class="pmp_phone active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
[% ELSE %]
+ value="itiva" class="pmp_phone active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
[% END %]
[% END %]
@@ -141,12 +145,12 @@
+ value="phone" checked="checked" class="pmp_phone active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
[% ELSE %]
+ value="phone" class="pmp_phone active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
[% END %]
[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js
index 9fc1eb079f..5fdc5c1917 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js
@@ -55,7 +55,8 @@ $(document).ready(function(){
}
function toggle_digest(id){
- if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) {
+ let phone_checked = TalkingTechItivaPhoneNotification ? false : PhoneNotification ? $("#phone"+id).prop("checked") : false;
+ if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") || phone_checked ) {
$("#digest"+id).attr("disabled", false).tooltip('disable');
} else {
$("#digest"+id).attr("disabled", true).prop("checked",false).tooltip('enable');
@@ -74,6 +75,9 @@ $(document).ready(function(){
$(".pmp_sms").click(function(){
toggle_digest(Number($(this).attr("id").replace("sms", "")));
});
+ $(".pmp_phone").click(function(){
+ toggle_digest(Number($(this).attr("id").replace("phone", "")));
+ });
// $('#memberentry_messaging_prefs [data-toggle="tooltip"][disabled]').tooltip();
});
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
index 97e57a0ce3..598ba1f20a 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
@@ -110,13 +110,13 @@
[% IF ( messaging_preference.transports_phone ) %]
[% ELSE %]
@@ -259,7 +259,11 @@
$("#info_digests").tooltip();
function toggle_digest(id){
- if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) {
+ let PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
+ let TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
+ let phone_checked = TalkingTechItivaPhoneNotification ? false : PhoneNotification ? $("#phone"+id).prop("checked") : false;
+
+ if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") || phone_checked ) {
$("#digest"+id).attr("disabled", false).tooltip('disable');
} else {
$("#digest"+id).attr("disabled", true).prop("checked",false).tooltip('enable');
@@ -278,6 +282,9 @@
$(".pmp_sms").click(function(){
toggle_digest(Number($(this).attr("id").replace("sms", "")));
});
+ $(".pmp_phone").click(function(){
+ toggle_digest(Number($(this).attr("id").replace("phone", "")));
+ });
});
|