Bug 34570 - Remove use of onclick for PopupMARCFieldDoc()
Summary: Remove use of onclick for PopupMARCFieldDoc()
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: David Cook
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 20397
  Show dependency treegraph
 
Reported: 2023-08-18 02:45 UTC by David Cook
Modified: 2023-12-28 20:47 UTC (History)
2 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:
23.11.00,23.05.04,22.11.10


Attachments
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc() (2.91 KB, patch)
2023-08-18 03:04 UTC, David Cook
Details | Diff | Splinter Review
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc() (2.96 KB, patch)
2023-08-18 06:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc() (3.05 KB, patch)
2023-08-25 09:52 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2023-08-18 02:45:30 UTC
We can't use "onclick" attributes with CSP and we generally try to avoid them in Koha.

This report targets the PopupMARCFieldDoc() function in the cataloguing editor.
Comment 1 David Cook 2023-08-18 03:04:18 UTC
Created attachment 154583 [details] [review]
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc()

This change removes the "onclick" attribute for the MARC doc
link in the cataloguing editor.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Click on the question mark (?) next to any of the MARC fields
3. Press the "Repeat this tag" button
4. Click on the question mark (?) on the cloned MARC field
5. Note that both times it worked
Comment 2 Owen Leonard 2023-08-18 06:23:27 UTC
Created attachment 154585 [details] [review]
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc()

This change removes the "onclick" attribute for the MARC doc
link in the cataloguing editor.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Click on the question mark (?) next to any of the MARC fields
3. Press the "Repeat this tag" button
4. Click on the question mark (?) on the cloned MARC field
5. Note that both times it worked

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2023-08-25 09:50:34 UTC
Filled assignee :)
Comment 4 Marcel de Rooy 2023-08-25 09:52:39 UTC
Created attachment 154792 [details] [review]
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc()

This change removes the "onclick" attribute for the MARC doc
link in the cataloguing editor.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Click on the question mark (?) next to any of the MARC fields
3. Press the "Repeat this tag" button
4. Click on the question mark (?) on the cloned MARC field
5. Note that both times it worked

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Tomás Cohen Arazi 2023-08-30 13:06:50 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-08-30 20:20:26 UTC
Pushed to 23.05.x for 23.05.04
Comment 7 Matt Blenkinsop 2023-08-31 10:47:20 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x