multi enum support empty strings

This commit is contained in:
yuri
2017-09-27 13:40:53 +03:00
parent 8d949fa1fc
commit fcd40af7c9
2 changed files with 28 additions and 3 deletions
+9 -2
View File
@@ -261,12 +261,19 @@ Espo.define('views/fields/array', ['views/fields/base', 'lib!Selectize'], functi
getValueForDisplay: function () {
return this.selected.map(function (item) {
var label = null;
if (this.translatedOptions != null) {
if (item in this.translatedOptions) {
return this.getHelper().stripTags(this.translatedOptions[item]);
label = this.getHelper().stripTags(this.translatedOptions[item]);
}
}
return this.getHelper().stripTags(item);
if (label === null) {
label = this.getHelper().stripTags(item);
}
if (label === '') {
label = this.translate('None');
}
return label;
}, this).join(', ');
},