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>