@@ -77,6 +77,10 @@
|
||||
if ($scope.canRemove()) {
|
||||
if (confirm('Are you sure you want to remove this?')) {
|
||||
$scope.archetypeRenderModel.fieldsets[$index].remove = true;
|
||||
/*
|
||||
Touches the model. Not sure why this is needed but without it the Digest doesn't run on a remove row.
|
||||
*/
|
||||
$scope.archetypeRenderModel = JSON.parse(JSON.stringify($scope.archetypeRenderModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c
|
||||
|
||||
var propertyConfig = getPropertyByAlias(configFieldsetModel, property.alias);
|
||||
|
||||
if(propertyConfig && propertyConfig.required && property.value == ""){
|
||||
if(propertyConfig && !fieldset.remove && propertyConfig.required && !property.value){
|
||||
fieldset.isValid = false;
|
||||
property.isValid = false;
|
||||
valid = false;
|
||||
|
||||
Reference in New Issue
Block a user