Bug 23901 - Fix js error sms_input is null in opac-messaging.tt
Summary: Fix js error sms_input is null in opac-messaging.tt
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on: 22862
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-25 13:35 UTC by Lari Taskula
Modified: 2021-06-14 21:29 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 23901: Fix sms_input is null in opac-messaging.tt (1.46 KB, patch)
2019-10-25 13:40 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 23901: Fix indentation (1.57 KB, patch)
2019-10-25 13:41 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 23901: Fix sms_input is null in opac-messaging.tt (1.49 KB, patch)
2019-10-25 13:52 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 23901: Fix indentation (1.67 KB, patch)
2019-10-25 13:53 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 23901: Fix sms_input is null in opac-messaging.tt (1.55 KB, patch)
2019-11-24 13:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23901: Fix indentation (1.74 KB, patch)
2019-11-24 13:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2019-10-25 13:35:54 UTC
Follow-up of Bug 22862
Comment 1 Lari Taskula 2019-10-25 13:40:55 UTC
Created attachment 94767 [details] [review]
Bug 23901: Fix sms_input is null in opac-messaging.tt

When sms messaging is disabled, JavaScript breaks on 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
Comment 2 Lari Taskula 2019-10-25 13:41:10 UTC
Created attachment 94768 [details] [review]
Bug 23901: Fix indentation

This patch only fixes the indentation of code inside the if-block.
Comment 3 Lari Taskula 2019-10-25 13:52:56 UTC
Created attachment 94769 [details] [review]
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
Comment 4 Lari Taskula 2019-10-25 13:53:07 UTC
Created attachment 94770 [details] [review]
Bug 23901: Fix indentation

This patch only fixes the indentation of code inside the if-block.

To test:
1. Apply patch
2. Run: git diff -w HEAD~1 and observe no result

Sponsored-by: Koha-Suomi Oy
Comment 5 Katrin Fischer 2019-11-24 13:24:38 UTC
Created attachment 95762 [details] [review]
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>
Comment 6 Katrin Fischer 2019-11-24 13:24:41 UTC
Created attachment 95763 [details] [review]
Bug 23901: Fix indentation

This patch only fixes the indentation of code inside the if-block.

To test:
1. Apply patch
2. Run: git diff -w HEAD~1 and observe no result

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2019-11-24 13:25:24 UTC
Simple change, passing QA too.
Comment 8 Martin Renvoize 2019-11-25 08:43:51 UTC
Nice work!

Pushed to master for 19.11.00