Bug 34711: Remove use of onclick for opac-privacy.pl
authorDavid Cook <dcook@prosentient.com.au>
Tue, 5 Sep 2023 04:58:52 +0000 (04:58 +0000)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 12 Oct 2023 16:00:18 +0000 (16:00 +0000)
commitbcd89d89b174b3e6bf64fa27ac5a653745064bd8
tree2cf333c402274641319d67919448187209aad376
parent8e7b3709c6b6956f67df89479994d9b85c2dee0e
Bug 34711: Remove use of onclick for opac-privacy.pl

This change removes the "onclick" attribute for the buttons
on opac-privacy.pl.

Note: The Javascript is placed in a separate file, which is
the preferred way for Javascript to be handled by
Content-Security-Policy

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACPrivacy
2. Set syspref to "Allow"
3. Go to http://localhost:8080/cgi-bin/koha/opac-privacy.pl
4. The confirmation modal appears and "OK" and "Cancel" buttons work as
   expected

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 c997fe863f70fa951c71dca73296ed1f497aeca7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdb5734ade61abf0e62b5a3f79d8fdcb3fbe38f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
koha-tmpl/opac-tmpl/bootstrap/js/privacy.js [new file with mode: 0644]