Bug 16305 - Remove the use of "onclick" from transport cost matrix
Summary: Remove the use of "onclick" from transport cost matrix
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/admin/transport-cost-ma...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-20 00:58 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:


Attachments
Bug 16305 - Remove the use of "onclick" from transport cost matrix (3.65 KB, patch)
2016-04-20 01:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16305 - Remove the use of "onclick" from transport cost matrix (3.74 KB, patch)
2016-04-20 09:36 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16305 - Remove the use of "onclick" from transport cost matrix (3.80 KB, patch)
2016-04-25 09:56 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 00:58:52 UTC
There are a few places in the transport cost matrix template where event attributes (onclick, onblur) are used. These should be rewritten so that JS functionality can be separate from the markup.
Comment 1 Owen Leonard 2016-04-20 01:10:17 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-04-20 09:36:52 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-25 09:56:55 UTC
Created attachment 50624 [details] [review]
[PASSED QA] Bug 16305 - Remove the use of "onclick" from transport cost matrix

This patch updates the transport cost matrix template to eliminate the
use of event attributes (onclick and onblur) in favor of JS separate
from the markup.

To test, apply the patch and go to Administration -> Transport cost
matrix.

- Click in any table cell. Form fields in the cell should activate.
- Check and uncheck the "disable" checkbox. The form field should be
  correctly disabled and enabled.
- Fill various enabled fields and submit the form to confirm that data
  is 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 2016-04-29 15:50:18 UTC
Pushed to master for Koha 16.05. Thanks Owen!