fix: replaced add doctype button with select group button
This commit is contained in:
parent
2af7e74eb9
commit
ac3fb73702
1 changed files with 25 additions and 0 deletions
25
frappe/core/doctype/doctype/doctype_list.js
Normal file
25
frappe/core/doctype/doctype/doctype_list.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
frappe.listview_settings["DocType"] = {
|
||||
onload: function (me) {
|
||||
me.page.btn_primary.addClass("hidden");
|
||||
|
||||
let actions = [
|
||||
{
|
||||
label: __("Add DocType"),
|
||||
description: __("Create a new DocType"),
|
||||
action: () => frappe.new_doc("DocType"),
|
||||
},
|
||||
{
|
||||
label: __("Add DocType (Form Builder)"),
|
||||
description: __("Use the form builder to create a new DocType"),
|
||||
action: () => frappe.set_route("form-builder", "new-doctype"),
|
||||
},
|
||||
];
|
||||
|
||||
frappe.utils.add_select_group_button(
|
||||
me.page.btn_primary.parent(),
|
||||
actions,
|
||||
"btn-primary",
|
||||
"add"
|
||||
);
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue