Don't allow deleting property groups with locked properties (#6567)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
c9ea3656bd
commit
cfa1f2bcfb
@@ -418,6 +418,10 @@
|
||||
|
||||
};
|
||||
|
||||
scope.canRemoveGroup = function(group){
|
||||
return _.find(group.properties, function(property) { return property.locked === true; }) == null;
|
||||
}
|
||||
|
||||
scope.removeGroup = function(groupIndex) {
|
||||
scope.model.groups.splice(groupIndex, 1);
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</ng-form>
|
||||
|
||||
<div class="umb-group-builder__group-remove" ng-if="!sortingMode">
|
||||
<div class="umb-group-builder__group-remove" ng-if="!sortingMode && canRemoveGroup(tab)">
|
||||
<i class="icon-trash" ng-click="togglePrompt(tab)"></i>
|
||||
<umb-confirm-action
|
||||
ng-if="tab.deletePrompt"
|
||||
|
||||
Reference in New Issue
Block a user