연락처 입력시 하이픈 자동 입력
(지역, 핸드폰 번호)
| | |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | getIssueIspFieldListCallBack : getIssueIspFieldListCallBack, |
| | | getIssueHostingFieldListCallBack : getIssueHostingFieldListCallBack |
| | | getIssueHostingFieldListCallBack : getIssueHostingFieldListCallBack, |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | $scope.vm.form.hostingId = result[0].id; |
| | | }); |
| | | |
| | | // 연락처 입력시 하이픈 자동 입력 |
| | | function autoHyphenPhone() { |
| | | let phone = $scope.vm.form.tel |
| | | let seoul = $scope.vm.form.tel |
| | | |
| | | // 핸드폰 및 지방 지역번호 조건 |
| | | phone.replace(/^[0-9]/g, ''); |
| | | // 서울 지역번호 조건 |
| | | seoul.replace(/^[0-9]/g, ''); |
| | | var tmp = ''; |
| | | |
| | | if (phone.length < 4) { |
| | | return phone; |
| | | } else if (phone.length < 7) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) == "02" && seoul.length == 9) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 5); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(5); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) == "02" && seoul.length == 10) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 6); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (phone.length < 11) { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 4); |
| | | tmp += '-'; |
| | | tmp += phone.substr(7); |
| | | $scope.vm.form.tel = tmp; |
| | | } |
| | | return phone; |
| | | } |
| | | |
| | | // 폼 전송 |
| | | function formSubmit(condition) { |
| | | $rootScope.spinner = true; |
| | | $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); // 전화번호를 보낼땐 하이픈을 제거해서 DB에 저장 |
| | | |
| | | var content = { |
| | | name : $rootScope.preventXss($scope.vm.form.name), // 업체명 |
| | |
| | | $uibModalInstance.dismiss('cancel'); |
| | | $(document).unbind("keydown"); // 단축키 이벤트 제거 |
| | | } |
| | | |
| | | } |
| | | |
| | | ]); |
| | | } |
| | | ); |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | // 전화번호 조회시 하이픈 추가 해서 조회 |
| | | result.data.data.forEach(function (telData) { |
| | | let hyphen = telData.tel.trim(); |
| | | let phone = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3"); |
| | | telData.tel = phone; |
| | | }); |
| | | |
| | | $scope.vm.responseData = result.data; |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("companyField.failedToSelectCompanyFieldFullList"), result.data.message.message); // 업체 관리 목록 조회 실패 |
| | |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | getIssueIspFieldListCallBack : getIssueIspFieldListCallBack, |
| | | getIssueHostingFieldListCallBack : getIssueHostingFieldListCallBack |
| | | getIssueHostingFieldListCallBack : getIssueHostingFieldListCallBack, |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | $scope.vm.autoCompletePage.hostingField.totalPage = result.data.page.totalPage; |
| | | } |
| | | |
| | | // 연락처 입력시 - 자동 입력 |
| | | function autoHyphenPhone() { |
| | | let phone = $scope.vm.form.tel |
| | | let seoul = $scope.vm.form.tel |
| | | |
| | | // 핸드폰 및 지방 지역번호 조건 |
| | | phone.replace(/^[0-9]/g, ''); |
| | | // 서울 지역번호 조건 |
| | | seoul.replace(/^[0-9]/g, ''); |
| | | var tmp = ''; |
| | | |
| | | if (phone.length < 4) { |
| | | return phone; |
| | | } else if (phone.length < 7) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) == "02" && seoul.length == 9) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 5); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(5); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) == "02" && seoul.length == 10) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 6); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (phone.length < 11) { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 4); |
| | | tmp += '-'; |
| | | tmp += phone.substr(7); |
| | | $scope.vm.form.tel = tmp; |
| | | } |
| | | return phone; |
| | | } |
| | | |
| | | // 폼 체크 |
| | | function formCheck(formInvalid) { |
| | | if (formInvalid) { |
| | | return true; |
| | |
| | | // 폼 전송 |
| | | function formSubmit() { |
| | | $rootScope.spinner = true; |
| | | $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); // 전화번호를 보낼땐 하이픈을 제거해서 DB에 저장 |
| | | |
| | | var content = { |
| | | id : parameter.id, |
| | |
| | | $scope.vm.form.name = result.data.content.name; |
| | | $scope.vm.form.manager = result.data.content.manager; |
| | | $scope.vm.form.email = result.data.content.email; |
| | | // 전화번호 하이픈 추가하여 조회 |
| | | let hyphen = result.data.content.tel.trim(); |
| | | let phone = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3"); |
| | | result.data.content.tel = phone; |
| | | $scope.vm.form.tel = result.data.content.tel; |
| | | $scope.vm.form.url = result.data.content.url; |
| | | $scope.vm.form.memo = result.data.content.memo; |
| | | if(result.data.content.ispFieldVo != null){ |
| | | |
| | | if (result.data.content.ispFieldVo != null) { |
| | | $scope.vm.form.ispName = result.data.content.ispFieldVo.name; |
| | | } |
| | | if(result.data.content.hostingFieldVo != null){ |
| | | if (result.data.content.hostingFieldVo != null) { |
| | | $scope.vm.form.hostingName = result.data.content.hostingFieldVo.name; |
| | | } |
| | | } |
| | |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | } |
| | | }; |
| | | |
| | | function autoHyphenPhone() { |
| | | let phone = $scope.vm.form.tel; |
| | | let seoul = $scope.vm.form.tel; |
| | | |
| | | phone.replace(/^[0-9]/g, ''); |
| | | seoul.replace(/^[0-9]/g, ''); |
| | | var tmp = ''; |
| | | |
| | | if (phone.length < 4) { |
| | | return phone; |
| | | } else if (phone.length < 7) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) === "02" && seoul.length === 9) { |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 5); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(5); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) === "02" && seoul.length === 10) { |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 6); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (phone.length < 11) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 4); |
| | | tmp += '-'; |
| | | tmp += phone.substr(7); |
| | | $scope.vm.form.tel = tmp; |
| | | } |
| | | return phone; |
| | | } |
| | | |
| | | // 폼 체크 |
| | | function formCheck(formInvalid) { |
| | | if (formInvalid) { |
| | |
| | | // 폼 전송 |
| | | function formSubmit(condition) { |
| | | $rootScope.spinner = true; |
| | | $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); |
| | | |
| | | var content = { |
| | | code : $rootScope.preventXss($scope.vm.form.code), //코드 |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | // 전화번호 조회시 하이픈 추가 해서 조회 |
| | | result.data.data.forEach(function (telDatas) { |
| | | let hyphen = telDatas.tel.trim(); |
| | | let phone = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3"); |
| | | telDatas.tel = phone; |
| | | }); |
| | | |
| | | $scope.vm.responseData = result.data; |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("hostingField.failedToSelectHostingFieldFullList"), result.data.message.message); // 호스팅 관리 목록 조회 실패 |
| | |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | } |
| | | }; |
| | | |
| | | function autoHyphenPhone () { |
| | | let phone = $scope.vm.form.tel; |
| | | let seoul = $scope.vm.form.tel; |
| | | |
| | | // 핸드폰 및 지방 지역번호 조건 |
| | | phone.replace(/^[0-9]/g,''); |
| | | // 서울 지역번호 조건 |
| | | seoul.replace(/^[0-9]/g,''); |
| | | var tmp = ''; |
| | | |
| | | if (phone.length < 4) { |
| | | return phone; |
| | | } else if (phone.length < 7) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3) |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) === "02" && seoul.length === 9) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 5); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(5); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) === "02" && seoul.length === 10) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 6); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (phone.length < 11) { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 4); |
| | | tmp += '-'; |
| | | tmp += phone.substr(7); |
| | | $scope.vm.form.tel = tmp; |
| | | } |
| | | return phone; |
| | | } |
| | | |
| | | // 폼 체크 |
| | | function formCheck(formInvalid) { |
| | | if (formInvalid) { |
| | | return true; |
| | |
| | | // 폼 전송 |
| | | function formSubmit() { |
| | | $rootScope.spinner = true; |
| | | $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); // 전화번호를 보낼땐 하이픈을 제거해서 DB에 저장 |
| | | |
| | | var content = { |
| | | id : parameter.id, |
| | |
| | | $scope.vm.form.name = result.data.content.name; |
| | | $scope.vm.form.manager = result.data.content.manager; |
| | | $scope.vm.form.email = result.data.content.email; |
| | | // 전화번호 하이픈 추가하여 조회 |
| | | let hyphen = result.data.content.tel.trim(); |
| | | let phone = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3"); |
| | | result.data.content.tel = phone; |
| | | $scope.vm.form.tel = result.data.content.tel; |
| | | $scope.vm.form.url = result.data.content.url; |
| | | $scope.vm.form.memo = result.data.content.memo; |
| | |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | return false; |
| | | } |
| | | |
| | | // 연락처 입력시 하이픈 자동 입력 |
| | | function autoHyphenPhone() { |
| | | let phone = $scope.vm.form.tel |
| | | let seoul = $scope.vm.form.tel |
| | | |
| | | // 핸드폰 및 지방 지역번호 조건 |
| | | phone.replace(/^[0-9]/g, ''); |
| | | // 서울 지역번호 조건 |
| | | seoul.replace(/^[0-9]/g, ''); |
| | | var tmp = ''; |
| | | |
| | | if (phone.length < 4) { |
| | | return phone; |
| | | } else if (phone.length < 7) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) === "02" && seoul.length === 9) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 5); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(5); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) === "02" && seoul.length === 10) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 6); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (phone.length < 11) { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 4); |
| | | tmp += '-'; |
| | | tmp += phone.substr(7); |
| | | $scope.vm.form.tel = tmp; |
| | | } |
| | | return phone; |
| | | } |
| | | |
| | | // 폼 전송 |
| | | function formSubmit(condition) { |
| | | $rootScope.spinner = true; |
| | | $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); // 전화번호를 보낼땐 하이픈을 제거해서 DB에 저장 |
| | | |
| | | var content = { |
| | | code : $rootScope.preventXss($scope.vm.form.code), //코드 |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | // 전화번호 조회시 하이픈 추가 해서 조회 |
| | | result.data.data.forEach(function (telData) { |
| | | let hyphen = telData.tel.trim(); |
| | | let phone = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3"); |
| | | telData.tel = phone |
| | | }); |
| | | |
| | | $scope.vm.responseData = result.data; |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("ispField.failedToSelectIspFieldFullList"), result.data.message.message); // 목록 조회 실패 |
| | |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | } |
| | | }; |
| | | |
| | | // 연락처 입력시 하이픈 자동 입력 |
| | | function autoHyphenPhone() { |
| | | let phone = $scope.vm.form.tel |
| | | let seoul = $scope.vm.form.tel |
| | | |
| | | // 핸드폰 및 지방 지역번호 조건 |
| | | phone.replace(/^[0-9]/g, ''); |
| | | // 서울 지역번호 조건 |
| | | seoul.replace(/^[0-9]/g, ''); |
| | | var tmp = ''; |
| | | |
| | | if (phone.length < 4) { |
| | | return phone; |
| | | } else if (phone.length < 7) { |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) == "02" && seoul.length == 9) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 5); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(5); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (seoul.substring(0, 2) == "02" && seoul.length == 10) { // 서울 지역번호 조건 |
| | | tmp += seoul.substring(0, 2); |
| | | tmp += '-'; |
| | | tmp += seoul.substring(2, 6); |
| | | tmp += '-'; |
| | | tmp += seoul.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else if (phone.length < 11) { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(6); |
| | | $scope.vm.form.tel = tmp; |
| | | } else { // 핸드폰 및 지방 지역번호 조건 |
| | | tmp += phone.substr(0, 3); |
| | | tmp += '-'; |
| | | tmp += phone.substr(3, 4); |
| | | tmp += '-'; |
| | | tmp += phone.substr(7); |
| | | $scope.vm.form.tel = tmp; |
| | | } |
| | | return phone; |
| | | } |
| | | |
| | | function formCheck(formInvalid) { |
| | | if (formInvalid) { |
| | | return true; |
| | |
| | | // 폼 전송 |
| | | function formSubmit() { |
| | | $rootScope.spinner = true; |
| | | $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); // 전화번호를 보낼땐 하이픈을 제거해서 DB에 저장 |
| | | |
| | | var content = { |
| | | id : parameter.id, |
| | |
| | | $scope.vm.form.name = result.data.content.name; |
| | | $scope.vm.form.manager = result.data.content.manager; |
| | | $scope.vm.form.email = result.data.content.email; |
| | | // 전화번호 하이픈 추가하여 조회 |
| | | let hyphen = result.data.content.tel.trim(); |
| | | let phone = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3"); |
| | | result.data.content.tel = phone; |
| | | $scope.vm.form.tel = result.data.content.tel; |
| | | $scope.vm.form.url = result.data.content.url; |
| | | $scope.vm.form.memo = result.data.content.memo; |
| | |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | onFileSelect : onFileSelect, // 프로필 업로드 |
| | | autoHypenPhone : autoHypenPhone // 연락처 입력시 - 자동 입력 |
| | | autoHyphenPhone : autoHyphenPhone // 연락처 입력시 하이픈 자동 입력 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | } |
| | | } |
| | | |
| | | // 연락처 입력시 - 자동 입력 |
| | | function autoHypenPhone() { |
| | | // 연락처 입력시 하이픈 자동 입력 |
| | | function autoHyphenPhone() { |
| | | // 핸드폰 번호 조건 |
| | | var str = $scope.vm.form.phone |
| | | str.replace(/^[0-9]/g, ''); |
| | | var tmp = ''; |
| | | |
| | | if (str.length < 4) { |
| | | return str; |
| | | } else if (str.length < 7) { |
| | |
| | | return str |
| | | } |
| | | |
| | | // 폼 체크 |
| | | function formCheck(formInvalid) { |
| | | if (formInvalid) { |
| | | return true; |
| | |
| | | return false; |
| | | } |
| | | |
| | | // 폼 전송 |
| | | function formSubmit() { |
| | | $rootScope.spinner = true; // 프로그래스 바 |
| | | |
| | |
| | | content.workspaceName = $rootScope.preventXss(content.workspaceName); |
| | | content.password = CryptoJS.SHA512(content.password).toString(); |
| | | content.language = $rootScope.language; // 기본 언어 |
| | | content.phone = content.phone.replace(/\-/g,''); |
| | | content.phone = content.phone.replace(/\-/g,''); // 전화번호를 보낼땐 하이픈을 제거해서 DB에 저장 |
| | | |
| | | User.add({ |
| | | method : "POST", |
| | |
| | | type="text" |
| | | class="form-control" |
| | | kr-input |
| | | ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" |
| | | input-regex="[^0-9]" |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.tel" |
| | | maxlength="20" |
| | | > |
| | | <div ng-show="companyFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger" |
| | | translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요. |
| | | </div> |
| | | maxlength="30"> |
| | | <!-- <div ng-show="companyFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger"--> |
| | | <!-- translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요.--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div> |
| | |
| | | type="text" |
| | | class="form-control" |
| | | kr-input |
| | | ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" |
| | | input-regex="[^0-9]" |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.tel" |
| | | maxlength="20" |
| | | > |
| | | <div ng-show="companyFieldModifyForm.tel.$error.pattern" class="help-block form-text text-danger" |
| | | translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요. |
| | | </div> |
| | | maxlength="30"> |
| | | <!-- <div ng-show="companyFieldModifyForm.tel.$error.pattern" class="help-block form-text text-danger"--> |
| | | <!-- translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요.--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div> |
| | |
| | | type="text" |
| | | class="form-control" |
| | | kr-input |
| | | ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" |
| | | input-regex="[^0-9]" |
| | | autocomplete="off" |
| | | ng-model="vm.form.tel" |
| | | maxlength="20" |
| | | > |
| | | <div ng-show="hostingFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger" |
| | | translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요. |
| | | </div> |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | maxlength="30"> |
| | | <!-- <div ng-show="hostingFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger"--> |
| | | <!-- translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요.--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div> |
| | |
| | | type="text" |
| | | class="form-control" |
| | | kr-input |
| | | input-regex="[^0-9]" |
| | | ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.tel" |
| | | maxlength="20" |
| | | > |
| | | <div ng-show="hostingFieldModifyForm.tel.$error.pattern" class="help-block form-text text-danger" |
| | | translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요. |
| | | </div> |
| | | maxlength="30"> |
| | | <!-- <div ng-show="hostingFieldModifyForm.tel.$error.pattern" class="help-block form-text text-danger"--> |
| | | <!-- translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요.--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div> |
| | |
| | | type="text" |
| | | class="form-control" |
| | | kr-input |
| | | ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" |
| | | input-regex="[^0-9]" |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.tel" |
| | | maxlength="20" |
| | | > |
| | | <div ng-show="ispFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger" |
| | | translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요. |
| | | </div> |
| | | maxlength="30"> |
| | | <!-- <div ng-show="ispFieldAddForm.tel.$error.pattern" class="help-block form-text text-danger"--> |
| | | <!-- translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요.--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div> |
| | |
| | | type="text" |
| | | class="form-control" |
| | | kr-input |
| | | ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" |
| | | input-regex="[^0-9]" |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.tel" |
| | | maxlength="20" |
| | | > |
| | | <div ng-show="ispFieldModifyForm.tel.$error.pattern" class="help-block form-text text-danger" |
| | | translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요. |
| | | </div> |
| | | maxlength="30"> |
| | | <!-- <div ng-show="ispFieldModifyForm.tel.$error.pattern" class="help-block form-text text-danger"--> |
| | | <!-- translate="companyField.invalidTelFormat">전화번호 형식이 맞지 않습니다. xxx-xxx-xxxx 형식으로 입력하세요.--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div> |
| | |
| | | input-regex="[^0-9]" |
| | | kr-input |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHypenPhone()" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.phone"> |
| | | <small class="fc-grey"><span translate="users.contactedEnterPhone">연락가능한 핸드폰 번호를 입력하세요.</span> |
| | | </small> |
| | |
| | | input-regex="[^0-9]" |
| | | kr-input |
| | | autocomplete="off" |
| | | ng-keyup="fn.autoHypenPhone()" |
| | | ng-keyup="fn.autoHyphenPhone()" |
| | | ng-model="vm.form.phone"> |
| | | <small class="fc-grey"><span translate="users.contactedEnterPhone">연락가능한 핸드폰 번호를 입력하세요.</span> |
| | | </small> |