fix: inconsistent mandatory constraint on html field during creation … (#36893)
* fix: inconsistent mandatory constraint on html field during creation of a new print format * fix: add mandatory_depends_on for the raw commands field
This commit is contained in:
parent
7d9fa49227
commit
b7678c8d39
2 changed files with 3 additions and 3 deletions
|
|
@ -37,8 +37,6 @@ frappe.ui.form.on("Print Format", {
|
|||
frappe.set_route("print-format-builder", frm.doc.name);
|
||||
}
|
||||
});
|
||||
} else if (frm.doc.custom_format && !frm.doc.raw_printing) {
|
||||
frm.set_df_property("html", "reqd", 1);
|
||||
}
|
||||
if (frappe.model.can_write("Customize Form")) {
|
||||
frappe.model.with_doctype(frm.doc.doc_type, function () {
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@
|
|||
"fieldname": "html",
|
||||
"fieldtype": "Code",
|
||||
"label": "HTML",
|
||||
"mandatory_depends_on": "eval: doc.custom_format",
|
||||
"oldfieldname": "html",
|
||||
"oldfieldtype": "Text Editor",
|
||||
"options": "Jinja"
|
||||
|
|
@ -127,6 +128,7 @@
|
|||
"fieldname": "raw_commands",
|
||||
"fieldtype": "Code",
|
||||
"label": "Raw Commands",
|
||||
"mandatory_depends_on": "raw_printing",
|
||||
"options": "Jinja"
|
||||
},
|
||||
{
|
||||
|
|
@ -292,7 +294,7 @@
|
|||
"icon": "fa fa-print",
|
||||
"idx": 1,
|
||||
"links": [],
|
||||
"modified": "2025-09-23 10:39:51.123539",
|
||||
"modified": "2026-02-11 13:17:55.662780",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Printing",
|
||||
"name": "Print Format",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue