From 6fa3d8c769d52d914350464d3d807ec55166fbb0 Mon Sep 17 00:00:00 2001 From: yuri Date: Tue, 29 Jan 2019 12:48:31 +0200 Subject: [PATCH] compose email append signature --- client/src/views/email/record/compose.js | 6 +++++- client/src/views/modals/compose-email.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/src/views/email/record/compose.js b/client/src/views/email/record/compose.js index e704980990..977972bfb6 100644 --- a/client/src/views/email/record/compose.js +++ b/client/src/views/email/record/compose.js @@ -52,7 +52,11 @@ Espo.define('views/email/record/compose', ['views/record/edit', 'views/email/rec } if (!this.options.signatureDisabled && this.hasSignature()) { - var body = this.prependSignature(this.model.get('body') || '', this.model.get('isHtml')); + var addSignatureMethod = 'prependSignature'; + if (this.options.appendSignature) { + addSignatureMethod = 'appendSignature'; + } + var body = this[addSignatureMethod](this.model.get('body') || '', this.model.get('isHtml')); this.model.set('body', body); } diff --git a/client/src/views/modals/compose-email.js b/client/src/views/modals/compose-email.js index faa8b06a9b..5974b40d45 100644 --- a/client/src/views/modals/compose-email.js +++ b/client/src/views/modals/compose-email.js @@ -88,6 +88,7 @@ Espo.define('views/modals/compose-email', 'views/modals/edit', function (Dep) { selectTemplateDisabled: this.options.selectTemplateDisabled, removeAttachmentsOnSelectTemplate: this.options.removeAttachmentsOnSelectTemplate, signatureDisabled: this.options.signatureDisabled, + appendSignature: this.options.appendSignature, exit: function () {} }; this.createView('edit', viewName, options, callback);