OWL ITS + 탐지시스템(인터넷 진흥원)
wyu
2021-11-29 836153c85c1134081e599fbdf5f17a3152d56341
사용자정의 필드 수정
5개 파일 변경됨
157 ■■■■ 파일 변경됨
src/main/webapp/i18n/ko/global.json 6 ●●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/scripts/app/customField/customFieldAdd.controller.js 8 ●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/scripts/app/customField/customFieldModify.controller.js 22 ●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/views/customField/customFieldAdd.html 31 ●●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/views/customField/customFieldModify.html 90 ●●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/i18n/ko/global.json
@@ -834,9 +834,11 @@
        "siteField": "URL 필드",
        "telField": "전화번호 필드",
        "invalidipAdressFormat": "IP 주소 형식이 맞지 않습니다.",
        "invalidNumberFormat": "숫자만 입력 가능합니다.",
        "invalidDateFormat": "날짜 형식이 맞지 않습니다.(xxxx-xx-xx)",
        "invalidEmailFormat": "이메일 형식이 맞지 않습니다.",
        "invalidSiteFormat": "홈페이지 주소 형식이 맞지 않습니다.",
        "invalidTelFormat": "전화번호 형식이 맞지 않습니다."
        "invalidSiteFormat": "홈페이지 주소 형식이 맞지 않습니다.(http://로 시작하셔야합니다)",
        "invalidTelFormat": "전화번호 형식이 맞지 않습니다(xxx-xxxx-xxxx)."
    },
    "tasks": {
        "agileBoardTitle": "칸반 보드"
src/main/webapp/scripts/app/customField/customFieldAdd.controller.js
@@ -165,11 +165,7 @@
                    var content = angular.copy($scope.vm.form);
                    content.name = $rootScope.preventXss(content.name);
                    content.numberType = $rootScope.preventXss(content.numberType);
                    content.ipAdress = $rootScope.preventXss(content.ipAdress);
                    content.email = $rootScope.preventXss(content.email);
                    content.site = $rootScope.preventXss(content.site);
                    content.tel = $rootScope.preventXss(content.tel);
                    if ($scope.vm.form.customFieldType === 'MULTI_SELECT'|| $scope.vm.form.customFieldType === "SINGLE_SELECT") {
                        var convertDefaultValues = "";
@@ -180,7 +176,7 @@
                            }
                        });
                        content.defaultValue = convertDefaultValues;
                        //content.defaultValue = convertDefaultValues;
                    }
                    CustomField.add($resourceProvider.getContent(
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 : []    //  옵션 값 변경 여부 확인을 위해 서버에서 내려올 때 원본 값을 따로 관리한다.
@@ -137,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;
@@ -151,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) {
src/main/webapp/views/customField/customFieldAdd.html
@@ -98,21 +98,29 @@
                <input ng-if="vm.form.customFieldType == 'NUMBER'"
                       name="numberType"
                       type="number"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^[0-9]*$/"
                       placeholder="숫자만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.numberType">
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.ipAdress.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidNumberFormat">숫자만 입력 가능합니다.
                </div>
                <input ng-if="vm.form.customFieldType == 'DATETIME'"
                       type="date"
                       name="dateTime"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[0-1])$/"
                       placeholder="날짜 형식만 입력 가능합니다."
                       autocomplete="off">
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.dateTime.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidDateFormat">날짜 형식이 맞지 않습니다.(xxxx-xx-xx)
                </div>
                <input ng-if="vm.form.customFieldType == 'IP_ADDRESS'"
                       name="ipAdress"
@@ -122,11 +130,11 @@
                       ng-pattern="/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/"
                       placeholder="IP 주소 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.ipAdress">
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.ipAdress.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidipAdressFormat">IP주소 형식이 맞지 않습니다.
                </div>
<!--                /@^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/-->
                <input ng-if="vm.form.customFieldType == 'EMAIL'"
                       name="email"
                       type="email"
@@ -136,7 +144,7 @@
                       ng-pattern="/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/"
                       placeholder="이메일 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.email">
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.email.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidEmailFormat">이메일 형식이 맞지 않습니다.
                </div>
@@ -150,22 +158,21 @@
                       ng-pattern="/(http(s)?:\/\/)([a-z0-9\w]+\.*)+[a-z0-9]{2,4}/gi"
                       placeholder="홈페이지 주소 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.site">
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.site.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidSiteFormat">홈페이지 주소 형식이 맞지 않습니다.
                     translate="common.invalidSiteFormat">홈페이지 주소 형식이 맞지 않습니다.(http://로 시작하셔야합니다)
                </div>
                <input ng-if="vm.form.customFieldType == 'TEL'"
                       id="phone"
                       name="tel"
                       type="number"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/"
                       placeholder="연락처 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.tel">
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidTelFormat">전화번호 형식이 맞지 않습니다.
                </div>
src/main/webapp/views/customField/customFieldModify.html
@@ -38,14 +38,14 @@
                <select id="customFieldModifyForm2" class="form-control" ng-model="vm.form.customFieldType"
                        ng-change="fn.changeCustomFieldType()">
                    <option value="INPUT" translate="common.stringField">문자열 필드</option>
                    <option value="SINGLE_SELECT" translate="common.singleSelectionField">단일 선택 필드</option>
                    <option value="MULTI_SELECT" translate="common.multipleSelectionField">다중 선택 필드</option>
                    <option value="NUMBER" translate="common.numberField">숫자 필드</option>
                    <option value="DATETIME" translate="common.datetimeField">날짜 필드</option>
                    <option value="IP_ADDRESS" translate="common.ipAddressField">IP 주소 필드</option>
                    <option value="EMAIL" translate="common.emailField">이메일 필드</option>
                    <option value="SITE" translate="common.siteField">홈페이지 주소 필드</option>
                    <option value="TEL" translate="common.telField">전화번호 필드</option>
                    <option value="SINGLE_SELECT" translate="common.singleSelectionField">단일 선택 필드</option>
                    <option value="MULTI_SELECT" translate="common.multipleSelectionField">다중 선택 필드</option>
                </select>
            </div>
@@ -56,6 +56,7 @@
                <label ng-show="vm.form.customFieldType == 'MULTI_SELECT'"><span
                        translate="customField.createMultiFieldList">다중 선택 필드 목록 만들기</span> <code
                        class="highlighter-rouge">*</code></label>
                <div class="input-group">
                    <input id="optionAdd"
                           type="text"
@@ -76,6 +77,7 @@
            </div>
            <div ng-repeat="option in vm.form.options" ng-show="vm.form.customFieldType == 'SINGLE_SELECT' || vm.form.customFieldType == 'MULTI_SELECT'">
<!--            <div ng-repeat="option in vm.form.options" ng-show="vm.form.customFieldType != 'INPUT'">-->
                <span class="select3-selection__choice">
                    <span>{{option}}</span>
                    <span class="select3-selection__choice__remove" ng-click="fn.removeOption($index)">×</span>
@@ -84,7 +86,8 @@
            <div class="form-group">
                <label for="customFieldModifyForm3"><span translate="customField.defaultValue">기본값</span> </label>
                <input id="customFieldModifyForm3"
                <input ng-if="vm.form.customFieldType == 'INPUT' || vm.form.customFieldType == 'SINGLE_SELECT' || vm.form.customFieldType == 'MULTI_SELECT'"
                       id="customFieldModifyForm3"
                       type="text"
                       name="defaultValue"
                       class="form-control"
@@ -93,6 +96,87 @@
                       kr-input
                       ng-maxlength="100"
                       autocomplete="off">
                <input ng-if="vm.form.customFieldType == 'NUMBER'"
                       name="numberType"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^[0-9]*$/"
                       placeholder="숫자만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.ipAdress.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidNumberFormat">숫자만 입력 가능합니다.
                </div>
                <input ng-if="vm.form.customFieldType == 'DATETIME'"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[0-1])$/"
                       placeholder="날짜 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.ipAdress.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidDateFormat">날짜 형식이 맞지 않습니다.(19|20년도 월은 1~12 일자는 31까지 입력가능합니다.)
                </div>
                <input ng-if="vm.form.customFieldType == 'IP_ADDRESS'"
                       name="ipAdress"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/"
                       placeholder="IP 주소 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.ipAdress.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidipAdressFormat">IP주소 형식이 맞지 않습니다.
                </div>
                <input ng-if="vm.form.customFieldType == 'EMAIL'"
                       name="email"
                       type="email"
                       class="form-control"
                       maxlength="30"
                       kr-input
                       ng-pattern="/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/"
                       placeholder="이메일 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.email.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidEmailFormat">이메일 형식이 맞지 않습니다.
                </div>
                <input ng-if="vm.form.customFieldType == 'SITE'"
                       name="site"
                       type="text"
                       class="form-control"
                       maxlength="30"
                       kr-input
                       ng-pattern="/(http(s)?:\/\/)([a-z0-9\w]+\.*)+[a-z0-9]{2,4}/gi"
                       placeholder="홈페이지 주소 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.site.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidSiteFormat">홈페이지 주소 형식이 맞지 않습니다.(http://로 시작하셔야합니다)
                </div>
                <input ng-if="vm.form.customFieldType == 'TEL'"
                       name="tel"
                       type="text"
                       class="form-control"
                       kr-input
                       ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/"
                       placeholder="연락처 형식만 입력 가능합니다."
                       autocomplete="off"
                       ng-model="vm.form.defaultValue">
                <div ng-show="customFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger"
                     translate="common.invalidTelFormat">전화번호 형식이 맞지 않습니다.
                </div>
                <small ng-show="customFieldModifyForm.defaultValue.$error.maxlength"
                       class="help-block form-text text-danger" translate="common.upTo100Characters">
                    최대 100글자까지 입력할 수 있습니다.