diff --git a/client/modules/crm/src/views/contact/fields/account.js b/client/modules/crm/src/views/contact/fields/account.js index 48c9d96836..a54dfec716 100644 --- a/client/modules/crm/src/views/contact/fields/account.js +++ b/client/modules/crm/src/views/contact/fields/account.js @@ -26,24 +26,26 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('crm:views/contact/fields/account', 'views/fields/link', function (Dep) { +define('crm:views/contact/fields/account', ['views/fields/link'], function (Dep) { return Dep.extend({ getAttributeList: function () { var list = Dep.prototype.getAttributeList.call(this); + list.push('accountIsInactive'); + return list; }, afterRender: function () { Dep.prototype.afterRender.call(this); + if (this.mode === 'list' || this.mode === 'detail') { if (this.model.get('accountIsInactive')) { this.$el.find('a').css('textDecoration', 'line-through'); } } - } + }, }); - }); diff --git a/client/modules/crm/src/views/contact/fields/accounts.js b/client/modules/crm/src/views/contact/fields/accounts.js index 8d6e336dd0..99a669b2fa 100644 --- a/client/modules/crm/src/views/contact/fields/accounts.js +++ b/client/modules/crm/src/views/contact/fields/accounts.js @@ -190,7 +190,7 @@ define('crm:views/contact/fields/accounts', ['views/fields/link-multiple-with-co let isPrimary = id === this.primaryId; let $a = $('') - .attr('href', 'javascript:') + .attr('role', 'button') .attr('data-action', 'setPrimary') .attr('data-id', id) .text(this.translate('Set Primary', 'labels', 'Account'));