Summary: | Choosing not to delete a budget does not need to be a form submission | ||
---|---|---|---|
Product: | Koha | Reporter: | Emily Lamancusa (emlam) <emily.lamancusa> |
Component: | Architecture, internals, and plumbing | Assignee: | Emily Lamancusa (emlam) <emily.lamancusa> |
Status: | RESOLVED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chloe.zermatten, lucas, martin.renvoize, phil |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 37728 | ||
Attachments: |
Bug 37797: Change cancel button to a link styled as a button
Bug 37797: Change cancel button to a link styled as a button Bug 37797: Change cancel button to a link styled as a button |
Description
Emily Lamancusa (emlam)
2024-08-30 20:41:51 UTC
Created attachment 170928 [details] [review] Bug 37797: Change cancel button to a link styled as a button On the confirmation page for deleting a budget, change "Do not delete" from a form submission to a link (styled to look like a button) in order to avoid errors from POSTing with no op. To test: 1. Go to Acquisitions > Budgets 2. Create a test budget 3. Attempt to delete the test budget 4. On the confirmation page, click "No, don't delete" --> An error appears saying that the form was POSTed with no op! 5. Apply patch 6. Repeat steps 3-4 --> You are linked back to the Budgets page. The budget was not deleted. Interesting bustage, that the before state, which is supposed to be a POST without an op, was actually a POST with the wrong op. We have templates that set $template->param(script_name=> to a string containing their actual path, but this one doesn't, so the template var script_name was apparently getting the path from the page's URL through some magic. Bet that's a whole new class of bug 36192 bustage we haven't yet noticed, where a script that was only getting POSTs now also gets GETs, and doesn't set script_name, and has a template that uses script_name. Oh, no magic, script_name isn't set so it's action="", which is the current page with its query string. Created attachment 170977 [details] [review] Bug 37797: Change cancel button to a link styled as a button On the confirmation page for deleting a budget, change "Do not delete" from a form submission to a link (styled to look like a button) in order to avoid errors from POSTing with no op. To test: 1. Go to Acquisitions > Budgets 2. Create a test budget 3. Attempt to delete the test budget 4. On the confirmation page, click "No, don't delete" --> An error appears saying that the form was POSTed with no op! 5. Apply patch 6. Repeat steps 3-4 --> You are linked back to the Budgets page. The budget was not deleted. Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com> Created attachment 171452 [details] [review] Bug 37797: Change cancel button to a link styled as a button On the confirmation page for deleting a budget, change "Do not delete" from a form submission to a link (styled to look like a button) in order to avoid errors from POSTing with no op. To test: 1. Go to Acquisitions > Budgets 2. Create a test budget 3. Attempt to delete the test budget 4. On the confirmation page, click "No, don't delete" --> An error appears saying that the form was POSTed with no op! 5. Apply patch 6. Repeat steps 3-4 --> You are linked back to the Budgets page. The budget was not deleted. Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed for 24.11! Well done everyone, thank you! Doesnt apply to 24.05.x, no backport. |