From 617039696c6a9679c6a166390a25c7e4efd14f74 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 (cherry picked from commit a6e66b560b37b0300e10e161277ff85b447451ff) Signed-off-by: Fridolin Somers --- .../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 48d3aea187..3788516718 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 @@ -55,24 +55,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 %] @@ -154,24 +154,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 %] @@ -186,24 +186,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 5706f21369..a27ea6aa67 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -88,9 +88,9 @@ [% IF ( messaging_preference.transport_sms ) %] [% IF ( messaging_preference.transports_sms ) %] - + [% ELSE %] - + [% END %] [% ELSE %] @@ -143,9 +143,9 @@ [% IF ( messaging_preference.transport_email ) %] [% IF ( messaging_preference.transports_email ) %] - + [% ELSE %] - + [% END %] [% ELSE %] @@ -250,7 +250,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") ) { @@ -261,7 +261,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") ) { @@ -270,7 +270,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