Bug 13123 - Duplicate label ids for language and opaclanguages
Summary: Duplicate label ids for language and opaclanguages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-21 18:18 UTC by Owen Leonard
Modified: 2015-06-04 23:33 UTC (History)
2 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 13123 - Duplicate label ids for language and opaclanguages (4.74 KB, patch)
2014-10-21 18:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13123 - Duplicate label ids for language and opaclanguages (4.76 KB, patch)
2014-10-23 05:09 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 13123 - Duplicate label ids for language and opaclanguages (4.87 KB, patch)
2014-10-24 06:29 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 Owen Leonard 2014-10-21 18:18:48 UTC
The labels corresponding to the checkboxes enabling translations in system preferences are duplicated from the language preference to the opaclanguages preference:

 language: <label for="en">English(en)</label>

 opaclanguages: <label for="en">English(en)</label>

The result is that clicking the opaclanguages label toggles the language label.
Comment 1 Owen Leonard 2014-10-21 18:42:49 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-10-23 05:09:49 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-10-24 06:29:14 UTC
Created attachment 32655 [details] [review]
[PASSED QA] Bug 13123 - Duplicate label ids for language and opaclanguages

When enabling or disabling a OPAC language choice clicking the label
triggers the checkbox under the language preference instead. This is
because both <label>s have the same id.

This patch adds a modifier to each label and corresponding id attribute
in order to make them unique.

To test, go to Administration -> System preferences -> I18N/L10N.
Clicking the "English (en)" label under the "language" system preference
should toggle the corresponding checkbox. Clicking the "English (en)"
label under the "opaclanguages" system preference should toggle the
correct checkbox.

Further tests:

- Install an English 'sub-language' like en-GB and confirm that
  checkbox labels work correctly.
- Install a non-English language and confirm that checkbox labels work
  correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template changes only.
Comment 4 Tomás Cohen Arazi 2014-11-07 18:22:34 UTC
Patch pushed to master.

Thanks Owen!