[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
Mon Apr 18 00:09:17 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268
--- Comment #3 from Aleisha Amohia <aleishaamohia at 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.
More information about the Koha-bugs
mailing list