property settings: property validation null check + remove textarea when no validation type is chosen.
This commit is contained in:
@@ -12,7 +12,7 @@ function EditPropertySettingsController($scope, contentTypeResource) {
|
||||
$scope.propertySettings.validationTypes = [];
|
||||
$scope.propertySettings.showValidationPattern = false;
|
||||
|
||||
//$scope.selectedValidationType = {};
|
||||
$scope.selectedValidationType = {};
|
||||
|
||||
$scope.validationTypes = [
|
||||
{
|
||||
@@ -77,8 +77,12 @@ function EditPropertySettingsController($scope, contentTypeResource) {
|
||||
}
|
||||
|
||||
$scope.changeValidationType = function(selectedValidationType) {
|
||||
$scope.model.property.validation.pattern = selectedValidationType.pattern;
|
||||
$scope.propertySettings.showValidationPattern = true;
|
||||
if(selectedValidationType) {
|
||||
$scope.model.property.validation.pattern = selectedValidationType.pattern;
|
||||
$scope.propertySettings.showValidationPattern = true;
|
||||
} else {
|
||||
$scope.propertySettings.showValidationPattern = false;
|
||||
}
|
||||
}
|
||||
|
||||
activate();
|
||||
|
||||
Reference in New Issue
Block a user