Bug 23901: Fix sms_input is null in opac-messaging.tt
authorLari Taskula <lari.taskula@hypernova.fi>
Fri, 25 Oct 2019 13:36:11 +0000 (13:36 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 25 Nov 2019 08:41:56 +0000 (08:41 +0000)
commit7b8780daa14dad446c0c7b0cdf4f01fe90531ed3
treee79a43f3af56f404391e908a3fe5822f2137e93e
parent4c853b0034e20d127a42149dd9d6239867d9df67
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt