kb email addition
This commit is contained in:
@@ -41,7 +41,12 @@ Espo.define('crm:knowledge-base-helper', 'ajax', function (Ajax) {
|
||||
getAttributesForEmail: function (model, attributes, callback) {
|
||||
attributes = attributes || {};
|
||||
attributes.body = model.get('body');
|
||||
attributes.name = this.getLanguage().translate('KnowledgeBaseArticle', 'scopeNames') + ': ' + model.get('name');
|
||||
if (attributes.name) {
|
||||
attributes.name = attributes.name + ' ';
|
||||
} else {
|
||||
attributes.name = '';
|
||||
}
|
||||
attributes.name += this.getLanguage().translate('KnowledgeBaseArticle', 'scopeNames') + ': ' + model.get('name');
|
||||
|
||||
Ajax.postRequest('KnowledgeBaseArticle/action/getCopiedAttachments', {
|
||||
id: model.id
|
||||
|
||||
@@ -94,30 +94,6 @@ Espo.define('crm:views/case/record/panels/activities', 'crm:views/record/panels/
|
||||
callback.call(this, attributes);
|
||||
|
||||
}.bind(this));
|
||||
|
||||
/*if (this.model.get('contactId')) {
|
||||
this.getModelFactory().create('Contact', function (contact) {
|
||||
contact.id = this.model.get('contactId');
|
||||
|
||||
this.listenToOnce(contact, 'sync', function () {
|
||||
var emailAddress = contact.get('emailAddress');
|
||||
if (emailAddress) {
|
||||
attributes.to = emailAddress;
|
||||
attributes.nameHash = {};
|
||||
attributes.nameHash[emailAddress] = contact.get('name');
|
||||
}
|
||||
|
||||
callback.call(this, attributes);
|
||||
});
|
||||
contact.fetch({
|
||||
error: function () {
|
||||
callback.call(this, attributes);
|
||||
}.bind(this)
|
||||
});
|
||||
}, this);
|
||||
} else {
|
||||
callback.call(this, attributes);
|
||||
}*/
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -74,7 +74,8 @@ Espo.define('crm:views/knowledge-base-article/record/list-for-case', 'views/reco
|
||||
var attributes = {
|
||||
parentType: 'Case',
|
||||
parentId: parentModel.id,
|
||||
parentName: parentModel.get('name')
|
||||
parentName: parentModel.get('name'),
|
||||
name: '[#' + parentModel.get('number') + ']'
|
||||
};
|
||||
|
||||
attributes.to = '';
|
||||
|
||||
Reference in New Issue
Block a user