]> git.koha-community.org Git - koha.git/commit
Bug 37270: Fix deletion of saved reports
authorOwen Leonard <oleonard@myacpl.org>
Tue, 9 Jul 2024 13:13:34 +0000 (13:13 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 22 Jul 2024 06:32:21 +0000 (07:32 +0100)
commit44d0703b4a9a9ab116b4d473c2805e3fb283c2a2
tree15e77e008e5c23501f3aa89dea834c69a5df80bc
parentf80cc53470ebba24b92c05e71ac74a7c3058234c
Bug 37270: Fix deletion of saved reports

This patch fixes deletion of saved reports in two instances which
were broken by the CSRF changes: From the dropdown menu in the table of
saved reports, and in the modal window which appears if you click the
"Preview" dropdown menu in the table of saved reports.

The patch also makes a minor change to form-submit.js so that the event
handler will attach to dynamically-generated elements (as is the case
with the preview modal).

To test, apply the patch and go to Reports -> Use saved.

- Add one or more reports if necessary.
- In the table of reports, click the secondary dropdown link in the
  "Run" button.
- Click "Delete." You should be asked to confirm, and confirming should
  correctly delete the report.
- Now test the "Preview SQL" link in the menu.
- A modal window should appear showing you the SQL of the report.
- In the footer of the modal, test the "Delete" button.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
koha-tmpl/intranet-tmpl/prog/js/form-submit.js