Bug 20298 - Notices template uses same html id for each language
Summary: Notices template uses same html id for each language
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-26 13:02 UTC by paxed
Modified: 2019-10-14 19:56 UTC (History)
3 users (show)

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


Attachments
Bug 20298: Fix SMS characters counter when TranslateNotices is set (5.38 KB, patch)
2018-02-28 17:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20298: Fix SMS characters counter when TranslateNotices is set (5.44 KB, patch)
2018-03-16 08:45 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 20298: Fix SMS characters counter when TranslateNotices is set (5.49 KB, patch)
2018-03-25 10:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20298: (follow-up) fix labels' for attributes (2.42 KB, patch)
2018-04-06 17:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2018-02-26 13:02:19 UTC
If you have multiple languages installed, the notices and slips page uses the same HTML id multiple times, once for each language. This prevents eg. the SMS character count javascript from working, because each of the textareas has the same id.
Comment 1 Jonathan Druart 2018-02-28 17:28:24 UTC
Created attachment 72293 [details] [review]
Bug 20298: Fix SMS characters counter when TranslateNotices is set

If you have multiple languages installed, the notices and slips page
uses the same HTML id multiple times, once for each language. This
prevents eg. the SMS character count javascript from working, because
each of the textareas has the same id.

Test plan:
Test the sms characters counter, with and without TranslateNotices
Make sure other features on this page still work correctly

QA: Make sure this change of id did not break something else.
Comment 2 paxed 2018-03-01 06:43:01 UTC
Also:
tools/letter.pl:        my $is_html = $input->param("is_html_$mtt");

And I'd guess all of the id attributes in the template within the "FOREACH lang IN letters.keys" -loop need to be verified, not just the sms ones ... :/
Comment 3 paxed 2018-03-01 06:45:01 UTC
(In reply to paxed from comment #2)
> Also:
> tools/letter.pl:        my $is_html = $input->param("is_html_$mtt");
> 

Derp, nevermind, that's the name, not the id.
Comment 4 Brendan Gallagher 2018-03-16 08:45:55 UTC
Created attachment 72993 [details] [review]
Bug 20298: Fix SMS characters counter when TranslateNotices is set

If you have multiple languages installed, the notices and slips page
uses the same HTML id multiple times, once for each language. This
prevents eg. the SMS character count javascript from working, because
each of the textareas has the same id.

Test plan:
Test the sms characters counter, with and without TranslateNotices
Make sure other features on this page still work correctly

QA: Make sure this change of id did not break something else.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 5 Katrin Fischer 2018-03-25 10:02:26 UTC
Created attachment 73238 [details] [review]
Bug 20298: Fix SMS characters counter when TranslateNotices is set

If you have multiple languages installed, the notices and slips page
uses the same HTML id multiple times, once for each language. This
prevents eg. the SMS character count javascript from working, because
each of the textareas has the same id.

Test plan:
Test the sms characters counter, with and without TranslateNotices
Make sure other features on this page still work correctly

QA: Make sure this change of id did not break something else.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2018-03-26 20:38:14 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Jonathan Druart 2018-04-06 17:09:19 UTC
Created attachment 73792 [details] [review]
Bug 20298: (follow-up) fix labels' for attributes
Comment 8 Jonathan Druart 2018-04-06 17:53:32 UTC
(In reply to Jonathan Druart from comment #7)
> Created attachment 73792 [details] [review] [review]
> Bug 20298: (follow-up) fix labels' for attributes

Pushed to master for 18.05