feat: Add a "Go To Page" button in page form view
This commit is contained in:
parent
c5a11f9fd0
commit
ebb26c771b
1 changed files with 5 additions and 0 deletions
|
|
@ -7,5 +7,10 @@ frappe.ui.form.on('Page', {
|
|||
// make the document read-only
|
||||
frm.set_read_only();
|
||||
}
|
||||
if (!frm.is_new() && !frm.doc.istable) {
|
||||
frm.add_custom_button(__('Go to {0} Page', [frm.doc.title || frm.doc.name]), () => {
|
||||
frappe.set_route(frm.doc.name);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue