10000 fix: enable disable save when navigating between docs (bp #11867) by mergify[bot] · Pull Request #11876 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: enable disable save when navigating between docs (bp #11867) #11876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frappe/core/doctype/report/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ frappe.ui.form.on('Report', {
refresh: function(frm) {
if (frm.doc.is_standard === "Yes" && !frappe.boot.developer_mode) {
// make the document read-only
frm.set_read_only();
frm.disable_form();
} else {
frm.enable_save();
}

let doc = frm.doc;
Expand Down Expand Up @@ -32,8 +34,6 @@ frappe.ui.form.on('Report', {
});
}, doc.disabled ? "fa fa-check" : "fa fa-off");
}

frm.events.report_type(frm);
},

ref_doctype: function(frm) {
Expand Down
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ frappe.ui.form.Form = class FrappeForm {
cur_frm = this;

if(this.docname) { // document to show

this.save_disabled = false;
// set the doc
this.doc = frappe.get_doc(this.doctype, this.docname);

Expand Down
0