[Bug 42013] New: Confirmation dialog for "Remove all reserves" never shown on course details page
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Bug ID: 42013 Summary: Confirmation dialog for "Remove all reserves" never shown on course details page Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Course reserves Assignee: koha-bugs@lists.koha-community.org Reporter: paul.derscheid@lmscloud.de QA Contact: testopia@bugs.koha-community.org On the course details page (course_reserves/course-details.tt), clicking "Remove all reserves" skips the confirmation dialog and immediately submits the form. The "Remove all reserves" button (#rm_items_button) is an <a> tag separate from the #rm_items form. The click handler on the button calls $("#rm_items").submit() programmatically. A separate $("#rm_items").click(...) handler was intended to show a confirmDelete dialog, but it is bound as a click event on the form element, which is never clicked by the user. jQuery's .submit() method also does not trigger click events, so the confirmation is never shown. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 --- Comment #1 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 194699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194699&action=edit Bug 42013: Fix missing confirmation dialog for "Remove all reserves" - The confirmDelete dialog for removing all reserves from a course was bound as a click handler on the #rm_items form element, which is never directly clicked by the user - The #rm_items_button click handler called .submit() on the form without checking confirmDelete first, bypassing the confirmation - Move the confirmDelete check into the #rm_items_button click handler and remove the dead #rm_items click handler Test plan: - Enable UseCourseReserves system preference (should be enabled in ktd) - Create a course (or use the existing one) and add at least one reserve to it - On the course details page, click "Remove all reserves" - Observe the form submits immediately without confirmation - Apply patch - Repeat the steps above - Verify a confirmation dialog now appears - Click cancel and verify the reserves are not removed - Click "Remove all reserves" again, confirm, and verify the reserves are removed -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |paul.derscheid@lmscloud.de |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194699|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 194909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194909&action=edit Bug 42013: Fix missing confirmation dialog for "Remove all reserves" - The confirmDelete dialog for removing all reserves from a course was bound as a click handler on the #rm_items form element, which is never directly clicked by the user - The #rm_items_button click handler called .submit() on the form without checking confirmDelete first, bypassing the confirmation - Move the confirmDelete check into the #rm_items_button click handler and remove the dead #rm_items click handler Test plan: - Enable UseCourseReserves system preference (should be enabled in ktd) - Create a course (or use the existing one) and add at least one reserve to it - On the course details page, click "Remove all reserves" - Observe the form submits immediately without confirmation - Apply patch - Repeat the steps above - Verify a confirmation dialog now appears - Click cancel and verify the reserves are not removed - Click "Remove all reserves" again, confirm, and verify the reserves are removed Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Koha collecto <koha@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@collecto.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194909|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 204765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204765&action=edit Bug 42013: Fix missing confirmation dialog for "Remove all reserves" - The confirmDelete dialog for removing all reserves from a course was bound as a click handler on the #rm_items form element, which is never directly clicked by the user - The #rm_items_button click handler called .submit() on the form without checking confirmDelete first, bypassing the confirmation - Move the confirmDelete check into the #rm_items_button click handler and remove the dead #rm_items click handler Test plan: - Enable UseCourseReserves system preference (should be enabled in ktd) - Create a course (or use the existing one) and add at least one reserve to it - On the course details page, click "Remove all reserves" - Observe the form submits immediately without confirmation - Apply patch - Repeat the steps above - Verify a confirmation dialog now appears - Click cancel and verify the reserves are not removed - Click "Remove all reserves" again, confirm, and verify the reserves are removed Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43450 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43450 [Bug 43450] Add actions column to list of courses with more menu options -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- This works as described and makes sense to fix the browser confirm dialog. Nice work. Passing QA! Note: On the course details page, both the Remove all reserves and Delete course butttons call confirmDelete(). Out of scope for this bug, but these should probably be replaced with bootstrap modals for consitency with newer parts of Koha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204765|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 206279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206279&action=edit Bug 42013: Fix missing confirmation dialog for "Remove all reserves" - The confirmDelete dialog for removing all reserves from a course was bound as a click handler on the #rm_items form element, which is never directly clicked by the user - The #rm_items_button click handler called .submit() on the form without checking confirmDelete first, bypassing the confirmation - Move the confirmDelete check into the #rm_items_button click handler and remove the dead #rm_items click handler Test plan: - Enable UseCourseReserves system preference (should be enabled in ktd) - Create a course (or use the existing one) and add at least one reserve to it - On the course details page, click "Remove all reserves" - Observe the form submits immediately without confirmation - Apply patch - Repeat the steps above - Verify a confirmation dialog now appears - Click cancel and verify the reserves are not removed - Click "Remove all reserves" again, confirm, and verify the reserves are removed Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42013 --- Comment #6 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org