hide cc field if empty
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user