Bug 38407 - Eliminate event handler attributes in the staff interface
Summary: Eliminate event handler attributes in the staff interface
Status: CONFIRMED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-08 01:23 UTC by David Cook
Modified: 2024-11-08 01:37 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2024-11-08 01:23:49 UTC
Like bug 34709 but for the staff interface
Comment 1 David Cook 2024-11-08 01:29:13 UTC
egrep -R " on[a-zA-Z]+=" --exclude-dir="greybox" koha-tmpl/intranet-tmpl/ | wc -l

The above shows that there are currently 181 instances of inline event handler attributes in the staff interface templates

(Note: There may be other places where inline event handler attributes are added to generated code throughout Koha other than in templates, but I think that Koha/FrameworkPlugin.pm already looks fixed, so those places might be few or non-existent.)
Comment 2 David Cook 2024-11-08 01:37:23 UTC
It wouldn't hurt to have a test in the QA scripts to make sure that inline event handler attributes aren't being added, if we don't have one already.

Note that we can quote the coding guidelines when we do specific reports for this one:

https://wiki.koha-community.org/wiki/Coding_Guidelines#JS9:_Avoid_the_use_of_event_attributes_like_.22onclick.22_to_attach_events