fix: use response html when use_html is 1

This commit is contained in:
sokumon 2025-03-31 23:42:41 +05:30
parent 2e97ecd68d
commit 5bf6446f54

View file

@ -71,7 +71,9 @@ frappe.ui.form.on("Auto Repeat", {
frappe.model.with_doc("Email Template", frm.doc.template, () => {
let email_template = frappe.get_doc("Email Template", frm.doc.template);
frm.set_value("subject", email_template.subject);
frm.set_value("message", email_template.response);
let message_value = email_template.response;
if (email_template.use_html) message_value = email_template.response_html;
frm.set_value("message", message_value);
frm.refresh_field("subject");
frm.refresh_field("message");
});