ability to disable field param in entity manager
This commit is contained in:
@@ -53,9 +53,9 @@
|
||||
"max": 100
|
||||
},
|
||||
"leadSource": {
|
||||
"type": "varchar",
|
||||
"type": "enum",
|
||||
"view": "Crm:Opportunity.Fields.LeadSource",
|
||||
"customizationDisabled": true
|
||||
"customizationOptionsDisabled": true
|
||||
},
|
||||
"closeDate": {
|
||||
"type": "date",
|
||||
|
||||
@@ -87,7 +87,16 @@ Espo.define('views/admin/field-manager/edit', ['view', 'model'], function (Dep,
|
||||
this.defs = model.defs.fields[this.field];
|
||||
}
|
||||
|
||||
this.params = this.getFieldManager().getParams(this.type) || [];
|
||||
this.params = [];
|
||||
var params = this.getFieldManager().getParams(this.type) || [];
|
||||
params.forEach(function (o) {
|
||||
var item = o.name;
|
||||
var disableParamName = 'customization' + Espo.Utils.upperCaseFirst(item) + 'Disabled';
|
||||
if (this.getMetadata().get('entityDefs.' + this.scope + '.fields.' + this.field + '.' + disableParamName)) {
|
||||
return;
|
||||
}
|
||||
this.params.push(o);
|
||||
}, this);
|
||||
|
||||
this.params.forEach(function (o) {
|
||||
this.model.defs.fields[o.name] = o;
|
||||
|
||||
Reference in New Issue
Block a user