Bugzilla – Attachment 119332 Details for
Bug 13613
Don't allow digest to be selected without a digest-able transport selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13613: (Bug 22744 follow-up) Remove js handling for 'none'
Bug-13613-Bug-22744-follow-up-Remove-js-handling-f.patch (text/plain), 8.24 KB, created by
Owen Leonard
on 2021-04-08 15:23:00 UTC
(
hide
)
Description:
Bug 13613: (Bug 22744 follow-up) Remove js handling for 'none'
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-04-08 15:23:00 UTC
Size:
8.24 KB
patch
obsolete
>From 9bd89a63f6b4a9a7bb0ab0f9952b088af79e22cb Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >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 <oleonard@myacpl.org> >--- > .../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 1fb470da3f..2eaab43d3f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -106,13 +106,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 %] > <input type="checkbox" > class="phone" > id="phone[% messaging_preference.message_attribute_id | html %]" > name="[% messaging_preference.message_attribute_id | html %]" >- value="phone" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> >+ value="phone" /> > [% END %] > </td> > [% ELSE %] >@@ -127,13 +127,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 %] > <input type="checkbox" > class="itiva" > id="itiva[% messaging_preference.message_attribute_id | html %]" > name="[% messaging_preference.message_attribute_id | html %]" >- value="itiva" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> >+ value="itiva" /> > [% END %] > </td> > [% ELSE %] >@@ -144,9 +144,9 @@ > [% IF ( messaging_preference.transport_email ) %] > <td class="selectcol"> > [% IF ( messaging_preference.transports_email ) %] >- <input type="checkbox" class="email" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> >+ <input type="checkbox" class="email" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" checked="checked" /> > [% ELSE %] >- <input type="checkbox" class="email" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> >+ <input type="checkbox" class="email" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" /> > [% END %] > </td> > [% ELSE %] >@@ -156,9 +156,9 @@ > [% IF ( messaging_preference.has_digest ) %] > <td class="selectcol"> > [% IF ( messaging_preference.digest ) %] >- <input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> >+ <input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" checked="checked" /> > [% ELSE %] >- <input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" /> >+ <input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" /> > [% END %] > </td> > [% ELSE %] >@@ -248,16 +248,6 @@ > [% BLOCK jsinclude %] > <script> > $(document).ready(function(){ >- $(".none").click(function(){ >- if($(this).attr("checked")){ >- var rowid = $(this).attr("id"); >- newid = Number(rowid.replace("none","")) >- $("#sms"+newid).removeAttr("checked"); >- $("#email"+newid).removeAttr("checked"); >- $("#digest"+newid).removeAttr("checked"); >- $("#rss"+newid).removeAttr("checked"); >- } >- }); > $("#info_digests").tooltip(); > > // At load time, we want digest disabled if no digest using transport is enabled >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13613
:
35471
|
118379
|
118380
|
118381
|
118648
|
118742
|
119331
|
119332
|
119333
|
120081
|
120737
|
120738
|
120739
|
120740
|
120760
|
120838