Merge pull request #2850 from rohitwaghchaure/enhance_page_and_report
[Enhance] Keep page and report fields read only, if developer mode if disabled
This commit is contained in:
commit
66e998401a
2 changed files with 11 additions and 1 deletions
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
frappe.ui.form.on('Page', {
|
||||
refresh: function(frm) {
|
||||
|
||||
if(!frappe.boot.developer_mode) {
|
||||
// make the document read-only
|
||||
frm.set_read_only();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,6 +53,13 @@ cur_frm.cscript.refresh = function(doc) {
|
|||
|
||||
|
||||
frappe.ui.form.on('Report', {
|
||||
refresh: function(frm) {
|
||||
if(!frappe.boot.developer_mode) {
|
||||
// make the document read-only
|
||||
frm.set_read_only();
|
||||
}
|
||||
},
|
||||
|
||||
ref_doctype: function(frm) {
|
||||
if(frm.doc.ref_doctype) {
|
||||
frm.trigger("set_doctype_roles")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue