]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 25 Oct 2024 16:36:41 +0000 (16:36 +0000)
commite68c56745abd59ace4266443f90cb8bae1e431c9
treeaebf6a8502cc650cbc0fff226d36d8e229463b6f
parent33fb560cf10272bf557c3fd0b0f2b6fcebc3923f
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>
(cherry picked from commit 44d0703b4a9a9ab116b4d473c2805e3fb283c2a2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
koha-tmpl/intranet-tmpl/prog/js/form-submit.js