[Bug 16268] New: Add confirm message when deleting circ and fines rules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Bug ID: 16268 Summary: Add confirm message when deleting circ and fines rules Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: aleishaamohia@hotmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com -- 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=16268 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|koha-bugs@lists.koha-commun |aleishaamohia@hotmail.com |ity.org | Depends on| |16267 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16267 [Bug 16267] Making circ and fines rules actions buttons -- 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=16268 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 --- Comment #1 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 50253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50253&action=edit Bug 16268: Add confirm message for deleting circ and fines rules To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- This patch violates the newly approved and newly added to the wiki (as of yesterday) coding guideline JS9: "Avoid the use of event attributes like "onclick" to attach events." https://wiki.koha-community.org/wiki/Coding_Guidelines#JS9:_Avoid_the_use_of... There is a simple function in staff-global.js which seems to be seldom used, but it could be in this case: function confirmDelete(message) { return (confirm(message) ? true : false); } --- $(document).ready(function(){ $(".delete_rule").on("click",function(){ return confirmDelete(MSG_CONFIRM_DELETE); }); }); I have started the process of tracking down and cleaning up use of "onclick" (See Bug 16262) but there are many templates to fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 --- Comment #3 from Aleisha Amohia <aleishaamohia@hotmail.com> --- (In reply to Owen Leonard from comment #2)
This patch violates the newly approved and newly added to the wiki (as of yesterday) coding guideline JS9: "Avoid the use of event attributes like "onclick" to attach events."
https://wiki.koha-community.org/wiki/Coding_Guidelines#JS9: _Avoid_the_use_of_event_attributes_like_.22onclick.22_to_attach_events
There is a simple function in staff-global.js which seems to be seldom used, but it could be in this case:
function confirmDelete(message) { return (confirm(message) ? true : false); }
---
$(document).ready(function(){ $(".delete_rule").on("click",function(){ return confirmDelete(MSG_CONFIRM_DELETE); }); });
I have started the process of tracking down and cleaning up use of "onclick" (See Bug 16262) but there are many templates to fix.
Ah thanks for bringing this to my attention. I recently had a few patches pass QA where I was using the onclick attribute for confirm messages. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50253|0 |1 is obsolete| | --- Comment #4 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 50301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50301&action=edit Bug 16268: Add confirm message for deleting circ and fines rules To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50301|0 |1 is obsolete| | --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 50502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50502&action=edit Bug 16268: Add confirm message for deleting circ and fines rules To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I don't think the confirmUnsetDel function is useful. We do not need a refactoring such trivial code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 50602 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50602&action=edit [PASSED QA] Bug 16268: Add confirm message for deleting circ and fines rules To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50502|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=16268 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, I had missed Jonathan's comment - Aleisha, could you take a look? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50602|0 |1 is obsolete| | --- Comment #9 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 50670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50670&action=edit Bug 16268: Add confirm message for deleting circ and fines rules EDIT: Removes unnecessary code and uses confirm message in staff-global.js To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50670|0 |1 is obsolete| | --- Comment #10 from Marc Véron <veron@veron.ch> --- Created attachment 50706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50706&action=edit Bug 16268: Add confirm message for deleting circ and fines rules EDIT: Removes unnecessary code and uses confirm message in staff-global.js To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Marc Véron <veron@veron.ch> 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=16268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50706|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 50727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50727&action=edit Bug 16268: Add confirm message for deleting circ and fines rules EDIT: Removes unnecessary code and uses confirm message in staff-global.js To test: 1) Apply 16267 2) Go to Admin -> Circ and fines rules 3) Try clicking on Delete and Unset buttons 4) Confirm a confirm message pops up and works as expected Sponsored-by: Catalyst IT Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master! Will be in the May 2016 release! Kiitos Aleisha! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org