fix(UX): Show reason for read only form in headline (#31511)

Alt fix for alert added via https://github.com/frappe/frappe/pull/20077
which looks like an error message and is confusing to new users.
This commit is contained in:
gavin 2025-03-05 00:36:28 +01:00 committed by GitHub
parent c5b0363a43
commit 49fe1cd3cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -428,7 +428,11 @@ frappe.ui.form.Form = class FrappeForm {
this.read_only = frappe.workflow.is_read_only(this.doctype, this.docname);
if (this.read_only) {
this.set_read_only();
frappe.show_alert(__("This form is not editable due to a Workflow."));
this.dashboard.set_headline(
__("This form is not editable due to a Workflow."),
"blue",
true
);
}
// check if doctype is already open