Bugzilla – Attachment 95762 Details for
Bug 23901
Fix js error sms_input is null in opac-messaging.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23901: Fix sms_input is null in opac-messaging.tt
Bug-23901-Fix-smsinput-is-null-in-opac-messagingtt.patch (text/plain), 1.55 KB, created by
Katrin Fischer
on 2019-11-24 13:24:38 UTC
(
hide
)
Description:
Bug 23901: Fix sms_input is null in opac-messaging.tt
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-11-24 13:24:38 UTC
Size:
1.55 KB
patch
obsolete
>From e447a723db09c508a8132c9cfe688a480e200a9b Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Fri, 25 Oct 2019 13:36:11 +0000 >Subject: [PATCH] Bug 23901: Fix sms_input is null in opac-messaging.tt > >When sms messaging is disabled, JavaScript breaks in opac-messaging.tt. >Bug introduced in Bug 22862. > >To test: >1. Enable EnhancedMessagingPreferences system preference >2. Disable sms messaging by unsetting SMSSendDriver system preference >3. Go to OPAC -> your messaging >4. Observe JavaScript error "sms_input is null" in your browser console >5. Apply patch >6. Refresh page and observe the error is gone > >Sponsored-by: Koha-Suomi Oy > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 2 ++ > 1 file changed, 2 insertions(+) > >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 d33c7b7b88..ef2b776144 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -193,6 +193,7 @@ function normalizeSMS(value){ > > var sms_input = document.getElementById('SMSnumber'); > >+if (typeof sms_input !== 'undefined' && sms_input !== null) { > sms_input.addEventListener('keyup', function(){ > var field = sms_input.value; > sms_input.value = normalizeSMS(field); >@@ -204,6 +205,7 @@ sms_input.addEventListener('paste', function(event) { > sms_input.value = normalizeSMS(paste); > }, 100); > }); >+} > > //]]> > </script> >-- >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 23901
:
94767
|
94768
|
94769
|
94770
| 95762 |
95763