Bug 23901

Summary: Fix js error sms_input is null in opac-messaging.tt
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: OPACAssignee: Lari Taskula <lari.taskula>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:
Bug Depends on: 22862    
Bug Blocks:    
Attachments: Bug 23901: Fix sms_input is null in opac-messaging.tt
Bug 23901: Fix indentation
Bug 23901: Fix sms_input is null in opac-messaging.tt
Bug 23901: Fix indentation
Bug 23901: Fix sms_input is null in opac-messaging.tt
Bug 23901: Fix indentation

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 (ashimema) 2019-11-25 08:43:51 UTC
Nice work!

Pushed to master for 19.11.00