Merge pull request #12133 from nextchamp-saqib/email-account-signature-fix
feat: fetch email account signature in email dialog
This commit is contained in:
commit
b4b009326b
1 changed files with 10 additions and 2 deletions
|
|
@ -672,10 +672,19 @@ frappe.views.CommunicationComposer = Class.extend({
|
|||
}
|
||||
},
|
||||
|
||||
setup_earlier_reply: function() {
|
||||
get_default_outgoing_email_account_signature: function() {
|
||||
return frappe.db.get_value('Email Account', { 'default_outgoing': 1, 'add_signature': 1 }, 'signature');
|
||||
},
|
||||
|
||||
setup_earlier_reply: async function() {
|
||||
let fields = this.dialog.fields_dict;
|
||||
let signature = frappe.boot.user.email_signature || "";
|
||||
|
||||
if (!signature) {
|
||||
const res = await this.get_default_outgoing_email_account_signature();
|
||||
signature = res.message.signature;
|
||||
}
|
||||
|
||||
if(!frappe.utils.is_html(signature)) {
|
||||
signature = signature.replace(/\n/g, "<br>");
|
||||
}
|
||||
|
|
@ -756,4 +765,3 @@ frappe.views.CommunicationComposer = Class.extend({
|
|||
return text.replace(/\n{3,}/g, '\n\n');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue