From d110ee69e343b8762b58a07fe91f01e3b78d3ed3 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 17 Mar 2021 13:25:44 +0000 Subject: [PATCH] Bug 13613: (Bug 22744 follow-up) Remove js handling for 'none' There was a function and a set of onclick events to handle the 'Do not notify' checkboxes. Those have been removed, so should this code To test: 1 - Sign in to opac 2 - Click on 'your messaging' tab from 'your account' 3 - Check/uncheck some boxes 4 - Note error in the console: Uncaught TypeError: document.opacmessaging.none2 is undefined 5 - Apply patch 6 - repeat 7 - no more error Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 4d15224c78b61e89f22eb44c4819475555808095) Signed-off-by: Fridolin Somers --- .../bootstrap/en/modules/opac-messaging.tt | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) 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 c30899dd89..5706f21369 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -105,13 +105,13 @@ class="phone" id="phone[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" - value="phone" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> + value="phone" checked="checked" /> [% ELSE %] + value="phone" /> [% END %] [% ELSE %] @@ -126,13 +126,13 @@ class="itiva" id="itiva[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" - value="itiva" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> + value="itiva" checked="checked" /> [% ELSE %] + value="itiva" /> [% END %] [% ELSE %] @@ -143,9 +143,9 @@ [% IF ( messaging_preference.transport_email ) %] [% IF ( messaging_preference.transports_email ) %] - + [% ELSE %] - + [% END %] [% ELSE %] @@ -155,9 +155,9 @@ [% IF ( messaging_preference.has_digest ) %] [% IF ( messaging_preference.digest ) %] - + [% ELSE %] - + [% END %] [% ELSE %] @@ -247,16 +247,6 @@ [% BLOCK jsinclude %]