File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%--
Class Name : AddrGroupRegist.jsp
Description : 주소록 등록 페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2021.05.18 안주영 최초 생성
author : 안주영
since : 2021.05.18
--%>
<%@ page contentType="text/html; charset=utf-8"%>kisa/kisa/insertKisa.do
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>주소록 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
});
/* pagination 페이지 링크 function */
function goList(){
var frm = document.writeForm ;
frm.action = "<c:url value='/uss/ion/addr/selectAddrGroupList.do'/>";
$('input[name=mberId]').val('');
frm.submit();
}
/* 등록시 값 확인 */
function fn_checkForm() {
var formchk = document.writeForm;
if(formchk.mberId.value == '') {
alert("ID를 입력해 주십시오");
return false;
}
return true;
}
/* 주소록 등록 function */
function fn_insert() {
if("" == $('input[name=addrGroupPhoneNo]').val().trim()){
alert("휴대폰번호는 필수 입니다.")
return false;
}
if(!confirm("등록하시겠습니까?")) {
return;
}
var frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/addrGroup/insertAddrGroup.do'/>";
frm.submit();
}
//저장
function fn_modify(){
if (confirm("수정 하시겠습니까?")) {
var form = document.writeForm;
var data = new FormData(form);
url = "/uss/ion/addr/updateAddrGroupAjax.do";
$.ajax({
type: "POST",
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success: function (returnData) {
console.log("returnData : ", returnData);
if (returnData.isSuccess) {
alert("저장에 성공했습니다.");
// 목록으로 이동
goList();
}
else {
alert(returnData.msg);
}
},
error: function (e) {
console.log("e : ", e);
alert("저장에 실패하였습니다.");
alert("ERROR : " + JSON.stringify(e));
}
});
}
}
</script>
</head>
<body>
<form name="writeForm" id="writeForm" method="post">
<input type="hidden" name="mberId" value="${addrGrpInfo.mberId}" />
<input type="hidden" name="addrGrpId" value="${addrGrpInfo.addrGrpId}" />
<input type="hidden" name="searchCondition" value="${searchVO.searchCondition}" />
<input type="hidden" name="searchKeyword" value="${searchVO.searchKeyword}" />
<input type="hidden" name="pageUnit" value="${searchVO.pageUnit}" />
<input name="pageIndex" type="hidden" value="${searchVO.pageIndex}" />
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">주소록 그룹 수정</h2>
<p class="tType6 c_999999">주소록 그룹을 수정 할 수 있습니다.</p>
</div>
<div class="pageCont">
<table class="tbType2">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<tr>
<th><span class="reqArea">주소록 그룹명</span></th>
<td colspan="3">
<input type="text"
name=addrGrpNm value="${addrGrpInfo.addrGrpNm}" title="주소록 그룹명" maxlength="100" />
</td>
</tr>
</tbody>
</table>
<div class="btnWrap">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;">
<c:if test="${!empty addrGrpInfo.addrGrpId }">
<input type="button" class="btnType1" value="수 정" onclick="fn_modify(); return false;">
</c:if>
<c:if test="${empty addrGrpInfo.addrGrpId }">
<input type="button" class="btnType1" value="저 장" onclick="fn_insert(); return false;">
</c:if>
</div>
</div>
</div>
</form>
<%-- <form name="searchForm" id="searchForm" method="post" action="<c:out value='/uss/ion/addr/selectAddrGroupList.do'/>"> --%>
<%-- <input name="pageIndex" type="hidden" value="${addrGroupVO.pageIndex}" /> --%>
<%-- </form> --%>
</body>
</html>