Bug 34571: Remove use of "onclick" for ExpandField in cataloguing editors
authorDavid Cook <dcook@prosentient.com.au>
Fri, 18 Aug 2023 04:32:31 +0000 (04:32 +0000)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 31 Aug 2023 10:46:35 +0000 (10:46 +0000)
commitca1efafa62883c4c64db8a34ffe576d6b4a1bcc8
tree7a94bed2ac640931de4a42245d1aab305fdd92e6
parent3c84023b845b11868fa875f75529a2ce8435ead7
Bug 34571: Remove use of "onclick" for ExpandField in cataloguing editors

This change replaces the onclick HTML attribute with a Javascript binding
to make it more in line with Koha conventions and make it CSP compatible.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Try hiding/unhiding fields
3. Try cloning fields and hiding/unhiding those too
4. Note that everything works as expected
5. Do the same thing for authorities by going to
http://localhost:8081/cgi-bin/koha/authorities/authorities.pl?authtypecode=#

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8341ffe13db350f3d0c623e1f6ff6671e1944d82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8237fdd32a6519ce063f3e119874e89395aec379)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/js/cataloging.js