link multiple role empty value

This commit is contained in:
yuri
2017-12-05 14:27:05 +02:00
parent 4f98f39f2a
commit 0bd2e65d93
2 changed files with 8 additions and 0 deletions
@@ -34,6 +34,8 @@ Espo.define('crm:views/meeting/fields/attendees', 'views/fields/link-multiple-wi
roleFieldIsForeign: false,
emptyRoleValue: 'None'
});
});
@@ -36,6 +36,8 @@ Espo.define('views/fields/link-multiple-with-role', 'views/fields/link-multiple'
roleFieldIsForeign: true,
emptyRoleValue: null,
setup: function () {
Dep.prototype.setup.call(this);
@@ -70,6 +72,10 @@ Espo.define('views/fields/link-multiple-with-role', 'views/fields/link-multiple'
var role = (this.columns[id] || {})[this.columnName] || '';
var roleHtml = '';
if (this.emptyRoleValue && role === this.emptyRoleValue) {
role = '';
}
if (role != '') {
roleHtml = '<span class="text-muted small"> &#187; ' +
this.getHelper().stripTags(this.getLanguage().translateOption(role, this.roleField, this.roleFieldScope)) +