fix: Add confirmation box before removal
This commit is contained in:
parent
ab915e3a81
commit
f3af2d054e
1 changed files with 15 additions and 6 deletions
|
|
@ -1818,12 +1818,21 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
return {
|
||||
label: __("Clear Assignment", null, "Button in list view actions menu"),
|
||||
action: () => {
|
||||
this.disable_list_update = true;
|
||||
bulk_operations.clear_assignment(this.get_checked_items(true), () => {
|
||||
this.disable_list_update = false;
|
||||
this.clear_checked_items();
|
||||
this.refresh();
|
||||
});
|
||||
frappe.confirm(
|
||||
"Are you sure you want to clear the assignments?",
|
||||
() => {
|
||||
this.disable_list_update = true;
|
||||
bulk_operations.clear_assignment(this.get_checked_items(true), () => {
|
||||
this.disable_list_update = false;
|
||||
this.clear_checked_items();
|
||||
this.refresh();
|
||||
});
|
||||
},
|
||||
() => {
|
||||
this.clear_checked_items();
|
||||
this.refresh();
|
||||
}
|
||||
);
|
||||
},
|
||||
standard: true,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue