fix phone number ui

This commit is contained in:
yuri
2018-08-09 11:01:23 +03:00
parent c3e16a896e
commit e68a5f1979
2 changed files with 9 additions and 5 deletions
@@ -10,7 +10,9 @@
</a>
{{/unless}}
{{#if ../doNotCall}}</s>{{/if}}
{{#if type}}
<span class="text-muted small">({{translateOption type scope=../../scope field=../../name}})</span>
{{/if}}
</div>
{{/each}}
{{else}}
+7 -5
View File
@@ -76,12 +76,14 @@ Espo.define('views/fields/phone', 'views/fields/varchar', function (Dep) {
}
if ((!phoneNumberData || phoneNumberData.length === 0) && this.model.get(this.name)) {
phoneNumberData = [{
var o = {
phoneNumber: this.model.get(this.name),
primary: true,
primary: true,
type: this.defaultType
}];
primary: true
};
if (this.mode === 'edit' && this.model.isNew()) {
o.type = this.defaultType;
}
phoneNumberData = [o];
}
var data = _.extend({