浏览代码

fix: Remove salutation from email

Reasons:
- It shows up only when few conditons (which are not very clear) are met. Since the behaviour is not consistent it creates unnecessary confusion
- Salutations are not configurable. Not all users want to start their email with "Dear" in which case they have to clear it first.
version-14
Suraj Shetty 3 年前
父节点
当前提交
a90a9ed807
共有 2 个文件被更改,包括 1 次插入12 次删除
  1. +1
    -2
      frappe/public/js/frappe/form/form.js
  2. +0
    -10
      frappe/public/js/frappe/views/communication.js

+ 1
- 2
frappe/public/js/frappe/form/form.js 查看文件

@@ -1146,8 +1146,7 @@ frappe.ui.form.Form = class FrappeForm {
subject: __(this.meta.name) + ': ' + this.docname,
recipients: this.doc.email || this.doc.email_id || this.doc.contact_email,
attach_document_print: true,
message: message,
real_name: this.doc.real_name || this.doc.contact_display || this.doc.contact_name
message: message
});
}



+ 0
- 10
frappe/public/js/frappe/views/communication.js 查看文件

@@ -263,7 +263,6 @@ frappe.views.CommunicationComposer = class {
const subject_field = me.dialog.fields_dict.subject;

let content = content_field.get_value() || "";
content = content.split('<!-- salutation-ends -->')[1] || content;

content_field.set_value(`${reply.message}<br>${content}`);
subject_field.set_value(reply.subject);
@@ -725,15 +724,6 @@ frappe.views.CommunicationComposer = class {

message += await this.get_signature();

const SALUTATION_END_COMMENT = "<!-- salutation-ends -->";
if (this.real_name && !message.includes(SALUTATION_END_COMMENT)) {
message = `
<p>${__('Dear {0},', [this.real_name], 'Salutation in new email')},</p>
${SALUTATION_END_COMMENT}<br>
${message}
`;
}

if (this.is_a_reply) {
message += this.get_earlier_reply();
}


正在加载...
取消
保存