From a6e66b560b37b0300e10e161277ff85b447451ff Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 17 Mar 2021 13:49:25 +0000 Subject: [PATCH] Bug 13613: (follow-up) Use more unique classes This resolves the issue of being unable to save email as it was being hit by the validator Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../en/includes/messaging-preference-form.inc | 24 +++++++++---------- .../prog/js/messaging-preference-form.js | 8 +++---- .../bootstrap/en/modules/opac-messaging.tt | 14 +++++------ 3 files changed, 23 insertions(+), 23 deletions(-) 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 be4119c7a5..9340384f7c 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 @@ -56,24 +56,24 @@ + value="sms" class="pmp_sms" checked="checked" disabled="disabled" /> [% ELSE %] + value="sms" class="pmp_sms" disabled="disabled" /> [% END %] [% ELSE %] [% IF ( messaging_preference.transports_sms ) %] + value="sms" checked="checked" class="pmp_sms active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" /> [% ELSE %] + value="sms" class="pmp_sms active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" /> [% END %] [% END %] @@ -155,24 +155,24 @@ + value="email" class="pmp_email" checked="checked" disabled="disabled" /> [% ELSE %] + value="email" class="pmp_email" disabled="disabled" /> [% END %] [% ELSE %] [% IF ( messaging_preference.transports_email ) %] + value="email" checked="checked" class="pmp_email active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" /> [% ELSE %] + value="email" class="pmp_email active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" /> [% END %] [% END %] @@ -187,24 +187,24 @@ + name="digest" class="pmp_digest" checked="checked" disabled="disabled" /> [% ELSE %] + name="digest" class="pmp_digest" disabled="disabled" /> [% END %] [% ELSE %] [% IF ( messaging_preference.digest ) %] + name="digest" checked="checked" class="pmp_digest active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" /> [% ELSE %] + name="digest" class="pmp_digest 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 920a9f7926..0196d6e1b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js +++ b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js @@ -49,7 +49,7 @@ $(document).ready(function(){ } // At load time, we want digest disabled if no digest using transport is enabled - $("#memberentry_messaging_prefs .email").each(function(){ + $(".pmp_email").each(function(){ var rowid = $(this).attr("id"); id = Number(rowid.replace("email","")); if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) { @@ -60,16 +60,16 @@ $(document).ready(function(){ }); // If user clears all digest using transports for a notice, disable digest checkbox - $(".email").click(function(){ + $(".pmp_email").click(function(){ var rowid = $(this).attr("id"); id = Number(rowid.replace("email","")); if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) { $("#digest"+id).attr("disabled", false); } else { - $("#digest"+id).attr("disabled", true); + $("#digest"+id).attr("disabled", true).prop("checked",false); } }); - $(".sms").click(function(){ + $(".pmp_sms").click(function(){ var rowid = $(this).attr("id"); id = Number(rowid.replace("sms","")); if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) { 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 e1faabeac8..a8c714950f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -89,9 +89,9 @@ [% IF ( messaging_preference.transport_sms ) %] [% IF ( messaging_preference.transports_sms ) %] - + [% ELSE %] - + [% END %] [% ELSE %] @@ -144,9 +144,9 @@ [% IF ( messaging_preference.transport_email ) %] [% IF ( messaging_preference.transports_email ) %] - + [% ELSE %] - + [% END %] [% ELSE %] @@ -251,7 +251,7 @@ $("#info_digests").tooltip(); // At load time, we want digest disabled if no digest using transport is enabled - $(".email").each(function(){ + $(".pmp_email").each(function(){ var rowid = $(this).attr("id"); id = Number(rowid.replace("email","")); if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) { @@ -262,7 +262,7 @@ }); // If user clears all digest using transports for a notice, disable digest checkbox - $(".email").click(function(){ + $(".pmp_email").click(function(){ var rowid = $(this).attr("id"); id = Number(rowid.replace("email","")); if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) { @@ -271,7 +271,7 @@ $("#digest"+id).attr("disabled", true).prop("checked",false); } }); - $(".sms").click(function(){ + $(".pmp_sms").click(function(){ var rowid = $(this).attr("id"); id = Number(rowid.replace("sms","")); if ( $("#email"+id).prop("checked") || $("#sms"+id).prop("checked") ) { -- 2.39.5