Bug 16297 - Remove the use of "onclick" from OAI sets configuration template
Summary: Remove the use of "onclick" from OAI sets configuration template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/admin/oai_sets.pl?op=mo...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-19 16:39 UTC by Owen Leonard
Modified: 2016-12-05 21:26 UTC (History)
4 users (show)

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


Attachments
Bug 16297 - Remove the use of "onclick" from OAI sets configuration template (3.29 KB, patch)
2016-04-19 16:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16297 - Remove the use of "onclick" from OAI sets configuration template (3.39 KB, patch)
2016-04-21 14:06 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16297 - Remove the use of "onclick" from OAI sets configuration template (3.45 KB, patch)
2016-04-25 09:48 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 2016-04-19 16:39:31 UTC
There are a couple of places where an "onclick" attribute is used in admin/oai_sets.tt. These should be rewritten so that JS functionality can be separate from the markup.
Comment 1 Owen Leonard 2016-04-19 16:45:40 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-04-21 14:06:09 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-25 09:48:03 UTC
Created attachment 50623 [details] [review]
[PASSED QA] Bug 16297 - Remove the use of "onclick" from OAI sets configuration template

In order to bring the OAI sets configuration template into compliance
with coding guideline JS9, this patch changes with way some JavaScript
events are handled by moving JS handling out of the HTML markup.

To test, apply the patch and go to Administration -> OAI sets
configuration.

- Create or edit a set.
- Test the "Add description" link. Clicking it should add a
  description textarea.
- Test the "Remove" link associated with multiple description lines.
  Click them should remove the corresponding textarea.
- Test that additions and removals are saved correctly.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Kyle M Hall (khall) 2016-04-29 15:32:46 UTC
Pushed to master for the 16.05 release. Thanks Owen!