OWL ITS + 탐지시스템(인터넷 진흥원)
wyu
2021-11-29 836153c85c1134081e599fbdf5f17a3152d56341
src/main/webapp/scripts/app/customField/customFieldModify.controller.js
@@ -30,11 +30,16 @@
                    form : {
                        id : parameter.id,
                        name : "",
                        customFieldType : "",    //  사용자 정의 필드 유형
                        customFieldType : "INPUT",    //  사용자 정의 필드 유형
                        defaultValue : "",  //  기본 값
                        options : [],  //  옵션
                        optionText : "",   //  옵션 값
                        useCustomFieldValue : false //  이슈에서 사용되고 있는지 여부 확인
                        useCustomFieldValue : false, //  이슈에서 사용되고 있는지 여부 확인
                        numberType : "",
                        ipAdress : "",
                        email : "",
                        site : "",
                        tel : ""
                    },
                    origin : {
                        options : []    //  옵션 값 변경 여부 확인을 위해 서버에서 내려올 때 원본 값을 따로 관리한다.
@@ -93,6 +98,7 @@
                    if ($scope.vm.form.customFieldType === "INPUT") {
                        return;
                    }
                    // $scope.vm.form.customFieldType == "NUMBER" 존재한다
                    var duplication = false;
                    //  해시 태그는 입력 금지 - 공백 치환
@@ -136,7 +142,7 @@
                    }
                    //  다중, 단일 선택일 경우에
                    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;
@@ -150,10 +156,15 @@
                function formSubmit() {
                    $rootScope.spinner = true;
                    var content = angular.copy($scope.vm.form);
                    content.name = $rootScope.preventXss(content.name);
                     var content = angular.copy($scope.vm.form);
                     content.name = $rootScope.preventXss(content.name);
                     content.numberType =$scope.vm.form.numberType;
                     content.ipAdress = $scope.vm.form.ipAdress;
                     content.email = $scope.vm.form.email;
                     content.site = $scope.vm.form.site;
                     content.tel =$scope.vm.form.tel;
                    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) {