don't show the variation toggle on a property type if the content type doesn't have it enabled, ensure the default variation is set on a new property type based on the content type setting

This commit is contained in:
Shannon
2018-04-24 15:41:50 +10:00
parent d552d5dadb
commit f49fa7b567
3 changed files with 7 additions and 2 deletions

View File

@@ -496,6 +496,7 @@
scope.propertySettingsDialogModel.property = property;
scope.propertySettingsDialogModel.contentType = scope.contentType;
scope.propertySettingsDialogModel.contentTypeName = scope.model.name;
scope.propertySettingsDialogModel.contentTypeAllowCultureVariant = scope.model.allowCultureVariant;
scope.propertySettingsDialogModel.view = "views/common/overlays/contenttypeeditor/propertysettings/propertysettings.html";
scope.propertySettingsDialogModel.show = true;

View File

@@ -56,8 +56,12 @@
function activate() {
matchValidationType();
//make the default the same as the content type
if (!$scope.model.property.id) {
$scope.model.property.allowCultureVariant = $scope.model.contentTypeAllowCultureVariant;
}
matchValidationType();
}
function changeValidationPattern() {

View File

@@ -85,7 +85,7 @@
</textarea>
</div>
<div class="umb-control-group clearfix" ng-if="model.contentType === 'documentType'">
<div class="umb-control-group clearfix" ng-if="model.contentType === 'documentType' && model.contentTypeAllowCultureVariant">
<h5>Property Type Variation</h5>