Bug 16308 - Remove the use of "onclick" from Z39.50/SRU servers template
Summary: Remove the use of "onclick" from Z39.50/SRU servers 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/z3950servers.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-20 12:49 UTC by Owen Leonard
Modified: 2016-12-05 21:27 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 16308 - Remove the use of "onclick" from Z39.50/SRU servers template (12.44 KB, patch)
2016-04-20 14:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16308 - Remove the use of "onclick" from Z39.50/SRU servers template (12.57 KB, patch)
2016-04-20 15:07 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16308 - Remove the use of "onclick" from Z39.50/SRU servers template (12.63 KB, patch)
2016-04-25 10:25 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-20 12:49:27 UTC
There are several places where event attributes are used in admin/z3950servers.tt. These should be rewritten so that JS functionality can be separate from the markup.
Comment 1 Owen Leonard 2016-04-20 14:10:37 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-04-20 15:07:25 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-25 10:25:12 UTC
Created attachment 50625 [details] [review]
[PASSED QA] Bug 16308 - Remove the use of "onclick" from Z39.50/SRU servers template

This patch removes the use of event attributes in the markup in favor of
attaching events in JavaScript.

This patch also revises the SRU search fields mapping template
considerably while correcting multiple HTML validation issues:

- Corrected label/id pairs.
- Corrected incorrect capitalization.
- Removed redundant <legend>
- Restructured form so that it displays in two columns.

Also changed in the z3950 servers template: Replaced empty [%
script_name %] variable with actual path.

To test, apply the patch and go to Administration -> Z39.50/SRU servers/

- In the list of servers, select Actions -> Delete. You should be
  prompted to confirm your choice. Test both confirming and cancelling.
- Create or edit an SRU server.
  - After entering text in the server name field, moving to the next
    field should trigger transformation of that text to upper case.
  - On the SRU Search fields mapping line, clicking the "Modify" button
    should trigger a popup.
    - In the "Modify SRU search fields mapping" popup:
      - The fields should display in two columns.
      - All labels should be correctly associated with corresponding
        inputs.

Followed test plan, works as expected.
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:47:17 UTC
Pushed to master for the 16.05 release. Thanks Owen!