| | |
| | | if (!duplication) { |
| | | if (!$rootScope.isDefined($scope.vm.form.optionText)) { |
| | | $scope.vm.form.optionText = ""; |
| | | SweetAlert.warning($filter("translate")("customField.emptyInputValue"), $filter("translate")("customField.emptyAddValue")); // 입력 값 확인 알림, 입력한 값이 없습니다. |
| | | SweetAlert.warning($filter("translate")("customField.emptyInputValue"), |
| | | $filter("translate")("customField.emptyAddValue")); // 입력 값 확인 알림, 입력한 값이 없습니다. |
| | | return; |
| | | } |
| | | $scope.vm.form.options.push($scope.vm.form.optionText); |
| | |
| | | }, 200); |
| | | } |
| | | else { |
| | | SweetAlert.warning($filter("translate")("customField.duplicateInputValue"), $filter("translate")("customField.alreadyAddedValue")); // "입력 값 중복 알림", "입력한 값이 이미 추가되어 있습니다." |
| | | SweetAlert.warning($filter("translate")("customField.duplicateInputValue"), |
| | | $filter("translate")("customField.alreadyAddedValue")); // "입력 값 중복 알림", "입력한 값이 이미 추가되어 있습니다." |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 다중, 단일 선택일 경우에 |
| | | if ($scope.vm.form.customFieldType !== "INPUT") { |
| | | if ($scope.vm.form.customFieldType === "MULTI_SELECT" || $scope.vm.form.customFieldType === "SINGLE_SELECT") { |
| | | // 옵션이 1개 이하일 경우에는 셀렉트 태그를 만들 수 없다. |
| | | if ($scope.vm.form.options.length < 1) { |
| | | return true; |
| | |
| | | var content = angular.copy($scope.vm.form); |
| | | content.name = $rootScope.preventXss(content.name); |
| | | |
| | | if ($scope.vm.form.customFieldType !== 'INPUT') { |
| | | if ($scope.vm.form.customFieldType === 'MULTI_SELECT'|| $scope.vm.form.customFieldType === "SINGLE_SELECT") { |
| | | var convertDefaultValues = ""; |
| | | |
| | | angular.forEach(content.defaultValue.split("#"), function (value) { |