diff --git a/frontend/client/src/views/email/record/detail.js b/frontend/client/src/views/email/record/detail.js index ec34146aed..721f7191eb 100644 --- a/frontend/client/src/views/email/record/detail.js +++ b/frontend/client/src/views/email/record/detail.js @@ -57,6 +57,14 @@ Espo.define('Views.Email.Record.Detail', 'Views.Record.Detail', function (Dep) { } }, + handleCcField: function () { + if (!this.model.get('cc')) { + this.hideField('cc'); + } else { + this.showField('cc'); + } + }, + afterRender: function () { Dep.prototype.afterRender.call(this); @@ -64,6 +72,10 @@ Espo.define('Views.Email.Record.Detail', 'Views.Record.Detail', function (Dep) { this.listenTo(this.model, 'change:attachmentsIds', function () { this.handleAttachmentField(); }, this); + this.handleCcField(); + this.listenTo(this.model, 'change:cc', function () { + this.handleCcField(); + }, this); }, send: function () {