Gets validation working with composition alias conflicts
This commit is contained in:
@@ -508,7 +508,7 @@ function umbDataFormatter() {
|
||||
|
||||
var realProperties = _.reject(g.properties, function (p) {
|
||||
//do not include these properties
|
||||
return p.propertyState === "init";
|
||||
return p.propertyState === "init" || p.inherited === true;
|
||||
});
|
||||
|
||||
var saveProperties = _.map(realProperties, function (p) {
|
||||
@@ -518,9 +518,19 @@ function umbDataFormatter() {
|
||||
|
||||
saveGroup.properties = saveProperties;
|
||||
|
||||
//if this is an inherited group and there are not non-inherited properties on it, then don't send up the data
|
||||
if (saveGroup.inherited === true && saveProperties.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return saveGroup;
|
||||
});
|
||||
|
||||
//we don't want any null groups
|
||||
saveModel.groups = _.reject(saveModel.groups, function(g) {
|
||||
return !g;
|
||||
});
|
||||
|
||||
return saveModel;
|
||||
},
|
||||
|
||||
|
||||
@@ -96,10 +96,12 @@
|
||||
<ng-form name="propertyTypeForm">
|
||||
<div class="control-group -no-margin" ng-if="!sortingMode">
|
||||
|
||||
<umb-locked-field locked="locked"
|
||||
<div class="umb-group-builder__property-meta-alias" ng-if="property.inherited">{{ property.alias }}</div>
|
||||
<umb-locked-field ng-if="!property.inherited"
|
||||
locked="locked"
|
||||
ng-model="property.alias"
|
||||
placeholder-text="'Alias...'"
|
||||
server-validation-field="{{'Groups[' + $parent.$index + '].Properties[' + $index + '].Alias'}}">
|
||||
server-validation-field="{{'Groups[' + $parent.$parent.$parent.$parent.$index + '].Properties[' + $index + '].Alias'}}">
|
||||
</umb-locked-field>
|
||||
|
||||
<div class="umb-group-builder__property-meta-label">
|
||||
@@ -107,7 +109,7 @@
|
||||
name="groupName"
|
||||
umb-auto-resize
|
||||
required
|
||||
val-server-field="{{'Groups[' + $parent.$index + '].Properties[' + $index + '].Label'}}"></textarea>
|
||||
val-server-field="{{'Groups[' + $parent.$parent.$parent.$parent.$index + '].Properties[' + $index + '].Label'}}"></textarea>
|
||||
|
||||
<span class="help-inline" val-msg-for="groupName" val-toggle-msg="valServerField"></span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user