Like bug 34570, we want to get rid of "onclick". In this case, I'm targeting ExpandField.
Actually this one needs to be in both Cataloguing and Authorities...
Created attachment 154584 [details] [review] 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=#
Created attachment 154586 [details] [review] 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>
Created attachment 154803 [details] [review] 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>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.04
Nice work everyone! Pushed to oldstable for 22.11.x