fix: minor changes
Clear headline to avoid duplicate headlines. Dont show headline for new forms
This commit is contained in:
parent
f7e45d1acd
commit
7d57d8030b
1 changed files with 2 additions and 2 deletions
|
|
@ -8,14 +8,14 @@ frappe.ui.form.on('Web Template', {
|
|||
}
|
||||
|
||||
frm.toggle_display('standard', frappe.boot.developer_mode);
|
||||
frm.toggle_display('template', !frm.doc.standard);
|
||||
},
|
||||
standard: function(frm) {
|
||||
if (!frm.doc.standard) {
|
||||
if (!frm.doc.standard && !frm.is_new()) {
|
||||
// If standard changes from true to false, hide template until
|
||||
// the next save. Changes will get overwritten from the backend
|
||||
// on save and should not be possible in the UI.
|
||||
frm.toggle_display('template', false);
|
||||
frm.dashboard.clear_headline();
|
||||
frm.dashboard.set_headline(__('Please save to edit the template.'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue