[Koha-bugs] [Bug 16268] Add confirm message when deleting circ and fines rules

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 15 15:32:49 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #2 from Owen Leonard <oleonard at 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_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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list