회원 정보 수정 페이지 모달로 변경.
parent
24b2c41b10
commit
5a5777a164
|
|
@ -323,7 +323,7 @@ public class AdminController {
|
||||||
UserVO userVO = userService.selectUserInfo(userid);
|
UserVO userVO = userService.selectUserInfo(userid);
|
||||||
model.addAttribute("userVO", userVO);
|
model.addAttribute("userVO", userVO);
|
||||||
|
|
||||||
return "admin/userInfoView";
|
return "admin/html/userInfoView";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,7 @@
|
||||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
|
||||||
<script src="../../../js/admin/userinfo.js"></script>
|
<script src="/js/admin/userinfo.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.searchList > li{
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="section_title">
|
<div class="section_title">
|
||||||
<!-- <p>현장 지원 시스템</p> -->
|
<!-- <p>현장 지원 시스템</p> -->
|
||||||
|
|
@ -21,7 +14,7 @@
|
||||||
<h1 class="h4 m-3">회원관리</h1>
|
<h1 class="h4 m-3">회원관리</h1>
|
||||||
<form:form commandName="userSearchVO" name="searchForm" action="/admin/userInfo" method="get">
|
<form:form commandName="userSearchVO" name="searchForm" action="/admin/userInfo" method="get">
|
||||||
|
|
||||||
<div class="row justify-content-between bg-white mx-3 py-2"">
|
<div class="row justify-content-between bg-white mx-3 py-2">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<ul class="nav nav-pills" role="tablist" style="margin-left: 16px">
|
<ul class="nav nav-pills" role="tablist" style="margin-left: 16px">
|
||||||
<li role="presentation" class="nav-item"><a class="nav-link ${userSearchVO.auth eq '99'?'active':''}" href="/admin/userInfo?auth=99">승인대기<span class="badge"><c:out value='${standByCount}' /></span></a></li>
|
<li role="presentation" class="nav-item"><a class="nav-link ${userSearchVO.auth eq '99'?'active':''}" href="/admin/userInfo?auth=99">승인대기<span class="badge"><c:out value='${standByCount}' /></span></a></li>
|
||||||
|
|
@ -31,75 +24,69 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-auto row">
|
<div class="col-auto row">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<select class="form-select" name="searchCondition">
|
<select class="form-select" name="searchCondition">
|
||||||
<option <c:if test="${userSearchVO.searchCondition eq 'all'}">selected</c:if> value="all">통합검색</option>
|
<option <c:if test="${userSearchVO.searchCondition eq 'all'}">selected</c:if> value="all">통합검색</option>
|
||||||
<option <c:if test="${userSearchVO.searchCondition eq 'name'}">selected</c:if> value="name">이름</option>
|
<option <c:if test="${userSearchVO.searchCondition eq 'name'}">selected</c:if> value="name">이름</option>
|
||||||
<option <c:if test="${userSearchVO.searchCondition eq 'company'}">selected</c:if> value="company">소속</option>
|
<option <c:if test="${userSearchVO.searchCondition eq 'company'}">selected</c:if> value="company">소속</option>
|
||||||
<option <c:if test="${userSearchVO.searchCondition eq 'email'}">selected</c:if> value="email">이메일</option>
|
<option <c:if test="${userSearchVO.searchCondition eq 'email'}">selected</c:if> value="email">이메일</option>
|
||||||
<option <c:if test="${userSearchVO.searchCondition eq 'phonenum'}">selected</c:if> value="phonenum">전화번호</option>
|
<option <c:if test="${userSearchVO.searchCondition eq 'phonenum'}">selected</c:if> value="phonenum">전화번호</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<input type="text" class="form-control" name="searchKeyword" value="${userSearchVO.searchKeyword}" />
|
<input type="text" class="form-control" name="searchKeyword" value="${userSearchVO.searchKeyword}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<input class="btn btn-outline-secondary" type="submit" value="검색" />
|
<input class="btn btn-outline-secondary" type="submit" value="검색" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row m-3 p-2 bg-white">
|
<div class="row m-3 p-2 bg-white">
|
||||||
<table class="table table-hover text-center">
|
<table class="table table-hover text-center">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>아이디</th>
|
<th>아이디</th>
|
||||||
<th>이름</th>
|
<th>이름</th>
|
||||||
<th>소속</th>
|
<th>소속</th>
|
||||||
<th>전화번호</th>
|
<th>전화번호</th>
|
||||||
<th>이메일</th>
|
<th>이메일</th>
|
||||||
<th>가입일</th>
|
<th>가입일</th>
|
||||||
<c:choose>
|
<th>${userSearchVO.auth eq '99'?'상태':'권한'}</th>
|
||||||
<c:when test="${userSearchVO.auth eq '99'}">
|
</tr>
|
||||||
<th>상태</th>
|
</thead>
|
||||||
</c:when>
|
<tbody>
|
||||||
<c:otherwise>
|
<c:if test="${count >= 1}">
|
||||||
<th>권한</th>
|
<c:forEach var="user" items="${userList}" varStatus="idx">
|
||||||
</c:otherwise>
|
<tr>
|
||||||
</c:choose>
|
<%--<a href="/admin/userInfo/<c:out value='${item.userid}' />"></a>--%>
|
||||||
</tr>
|
<td class="clickAbleObj userInfoModalBtn useridTd"><c:out value='${user.userid}' /></td>
|
||||||
</thead>
|
<td class="clickAbleObj userInfoModalBtn"><c:out value='${user.name}' /></td>
|
||||||
<tbody>
|
<td class="clickAbleObj userInfoModalBtn"><c:out value='${user.company}' /></td>
|
||||||
<c:if test="${count >= 1}">
|
<td class="clickAbleObj userInfoModalBtn"><c:out value='${user.phonenum}' /></td>
|
||||||
<c:forEach var="item" items="${userList}" varStatus="idx">
|
<td class="clickAbleObj userInfoModalBtn"><c:out value='${user.email}' /></td>
|
||||||
<tr>
|
<td class="clickAbleObj userInfoModalBtn td_date"><c:out value='${user.regdate}' /></td>
|
||||||
<td><a href="/admin/userInfo/<c:out value='${item.userid}' />"><c:out value='${item.userid}' /></a></td>
|
<td>
|
||||||
<td><a href="/admin/userInfo/<c:out value='${item.userid}' />"><c:out value='${item.name}' /></a></td>
|
<c:choose>
|
||||||
<td><a href="/admin/userInfo/<c:out value='${item.userid}' />"><c:out value='${item.company}' /></a></td>
|
<c:when test="${user.auth eq '1'}">관리자</c:when>
|
||||||
<td><a href="/admin/userInfo/<c:out value='${item.userid}' />"><c:out value='${item.phonenum}' /></a></td>
|
<c:when test="${user.auth eq '2'}">사용자</c:when>
|
||||||
<td><a href="/admin/userInfo/<c:out value='${item.userid}' />"><c:out value='${item.email}' /></a></td>
|
<c:when test="${user.auth eq '99'}">
|
||||||
<td class="td_date"><c:out value='${item.regdate}' /></a></td>
|
<input type="button" class="btn btn-outline-success" value="승인" onclick="confirmBtn('${user.userid}','2'); return false;" />
|
||||||
<td>
|
<input type="button" class="btn btn-outline-danger" value="삭제" onclick="confirmBtn('${user.userid}','-1'); return false;" />
|
||||||
<c:choose>
|
</c:when>
|
||||||
<c:when test="${item.auth eq '1'}">관리자</c:when>
|
</c:choose>
|
||||||
<c:when test="${item.auth eq '2'}">사용자</c:when>
|
</td>
|
||||||
<c:when test="${item.auth eq '99'}">
|
</tr>
|
||||||
<input type="button" class="btn btn-outline-success" value="승인" onclick="confirmBtn('${item.userid}','2'); return false;" />
|
</c:forEach>
|
||||||
<input type="button" class="btn btn-outline-danger" value="삭제" onclick="confirmBtn('${item.userid}','-1'); return false;" />
|
</c:if>
|
||||||
</c:when>
|
<c:if test="${count == 0}">
|
||||||
</c:choose>
|
<tr><td colspan="7">요청한 목록이 없습니다.</td></tr>
|
||||||
</td>
|
</c:if>
|
||||||
</tr>
|
</tbody>
|
||||||
</c:forEach>
|
</table>
|
||||||
</c:if>
|
</div>
|
||||||
<c:if test="${count == 0}">
|
|
||||||
<tr><td colspan="7">요청한 목록이 없습니다.</td></tr>
|
|
||||||
</c:if>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="text-page">
|
<div class="text-page">
|
||||||
<form:hidden path="pageIndex" />
|
<form:hidden path="pageIndex" />
|
||||||
<nav aria-label="Page navigation">
|
<nav aria-label="Page navigation">
|
||||||
|
|
@ -115,3 +102,17 @@
|
||||||
<input type="hidden" id="auth" name="auth" />
|
<input type="hidden" id="auth" name="auth" />
|
||||||
</form:form>
|
</form:form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="userInfoModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userInfoModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="userInfoModalLabel">회원 정보 수정</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="userInfoModalBody">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -4,91 +4,77 @@
|
||||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
|
||||||
<script src="../../../js/admin/userinfoView.js"></script>
|
|
||||||
<div class="row justify-content-between bg-white mx-3 py-2">
|
<div class="row justify-content-between bg-white mx-3 py-2">
|
||||||
|
<form:form commandName="userVO" name="updateForm" id="updateForm" action="/admin/userUpdate" method="post">
|
||||||
|
<div class="section_content">
|
||||||
|
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
|
||||||
|
<input type="hidden" name="userid" value="${userVO.userid}" />
|
||||||
|
|
||||||
<form:form commandName="userVO" name="updateForm" id="updateForm" action="/admin/userUpdate" method="post">
|
<table class="join_table">
|
||||||
<div class="section_content">
|
<tbody>
|
||||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
|
<tr>
|
||||||
<input type="hidden" name="userid" value="${userVO.userid}" />
|
<th>아이디</th>
|
||||||
|
<td>${userVO.userid}</td>
|
||||||
<div class="join_top">
|
</tr>
|
||||||
<h2> <i class="bi bi-person-circle"></i> 회원 정보 수정</h2>
|
<tr>
|
||||||
</div>
|
<th><label for="password">비밀번호</label></th>
|
||||||
<table class="join_table">
|
<td>
|
||||||
<tbody>
|
<p><label for="changePw"><input type="checkbox" id="changePw" /> 비밀번호 변경</label></p>
|
||||||
<tr>
|
<input type="password" class="form-control" id="password" name="password" value="" disabled="true" />
|
||||||
<th>아이디</th>
|
</td>
|
||||||
<td>${userVO.userid}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th><label for="passwordCheck">비밀번호 확인</label></th>
|
||||||
<th>비밀번호</th>
|
<td><input type="password" class="form-control" id="passwordCheck" name="passwordCheck" value="" disabled="true" />
|
||||||
<td>
|
</td>
|
||||||
<p><label><input type="checkbox" id="changePw" /> 비밀번호 변경</<label></p>
|
</tr>
|
||||||
<input type="password" class="form-control" id="password" name="password" value="" disabled="true" />
|
<tr>
|
||||||
</td>
|
<th><label for="name">이름</label></th>
|
||||||
</tr>
|
<td><input type="text" class="form-control" name="name" id="name" value="${userVO.name}" /></td>
|
||||||
<tr>
|
</tr>
|
||||||
<th>비밀번호 확인</th>
|
<tr>
|
||||||
<td><input type="password" class="form-control" id="passwordCheck" name="passwordCheck" value="" disabled="true" />
|
<th><label for="company">소속기관</label></th>
|
||||||
</td>
|
<td><input type="text" class="form-control" name="company" id="company" value="${userVO.company}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>이름</th>
|
<th><label for="phonenum">연락처</label></th>
|
||||||
<td><input type="text" class="form-control" name="name" id="name" value="${userVO.name}" /></td>
|
<td><input type="text" class="form-control" name="phonenum" id="phonenum" value="${userVO.phonenum}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>소속기관</th>
|
<th><label for="email">이메일</label></th>
|
||||||
<td><input type="text" class="form-control" name="company" id="company" value="${userVO.company}" /></td>
|
<td>
|
||||||
</tr>
|
<div>
|
||||||
<tr>
|
<input type="text" class="form-control" name="email" id="email" value="${userVO.email}" />
|
||||||
<th>연락처</th>
|
</div>
|
||||||
<td><input type="text" class="form-control" name="phonenum" id="phonenum" value="${userVO.phonenum}"/></td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th>이메일</th>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<input type="text" class="form-control" name="email" id="email" value="${userVO.email}" />
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<c:if test="${userVO.auth ne '99'}">
|
|
||||||
<tr>
|
|
||||||
<th>권한</th>
|
|
||||||
<td>
|
|
||||||
<label class="auth-label">
|
|
||||||
<input type="radio" name="auth" value="2"
|
|
||||||
<c:if test="${userVO.auth eq '2'}">checked</c:if>
|
|
||||||
/> 사용자
|
|
||||||
</label>
|
|
||||||
<label class="auth-label">
|
|
||||||
<input type="radio" name="auth" value="1"
|
|
||||||
<c:if test="${userVO.auth eq '1'}">checked</c:if>
|
|
||||||
/> 관리자
|
|
||||||
</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</c:if>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="join_top" style="margin-top:20px;">
|
|
||||||
<p class="search_p1">
|
|
||||||
<input class="btn btn-primary" type="button" value="목록" onclick="history.go(-1)" />
|
|
||||||
</p>
|
|
||||||
<p class="search_p2">
|
|
||||||
<c:choose>
|
|
||||||
<c:when test="${userVO.auth eq '99'}">
|
|
||||||
<input type="button" class="btn btn-success" value="승인" onclick="confirmBtn('${item.userid}','2'); return false;" />
|
|
||||||
<input type="button" class="btn btn-danger" value="삭제" onclick="confirmBtn('${item.userid}','-1'); return false;" />
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
<input class="btn btn-success" type="button" value="수정" onclick="update();" />
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form:form>
|
|
||||||
|
|
||||||
|
<c:if test="${userVO.auth ne '99'}">
|
||||||
|
<tr>
|
||||||
|
<th>권한</th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="auth" id="auth2" value="2" <c:if test="${userVO.auth eq '2'}">checked</c:if>/>
|
||||||
|
<label for="auth2" class="auth-label">사용자</label>
|
||||||
|
<input type="radio" name="auth" id="auth1" value="1" <c:if test="${userVO.auth eq '1'}">checked</c:if>/>
|
||||||
|
<label for="auth1" class="auth-label">관리자</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="join_top mt-3">
|
||||||
|
<p class="search_p2">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${userVO.auth eq '99'}">
|
||||||
|
<input type="button" class="btn btn-success" value="승인" onclick="confirmBtn('${userVO.userid}','2'); return false;" />
|
||||||
|
<input type="button" class="btn btn-danger" value="삭제" onclick="confirmBtn('${userVO.userid}','-1'); return false;" />
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<input class="btn btn-success" type="button" value="수정" onclick="update();" />
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form:form>
|
||||||
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -718,4 +718,8 @@ a {
|
||||||
background-color: #337ab7;
|
background-color: #337ab7;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.clickAbleObj:hover{
|
||||||
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
|
|
@ -1,26 +1,92 @@
|
||||||
|
let userInfoModal;
|
||||||
|
$(function(){
|
||||||
|
userInfoModal = new bootstrap.Modal(document.getElementById('userInfoModal'));
|
||||||
|
})
|
||||||
|
|
||||||
function fn_link_page(pageNo) {
|
$(document).on('click', '.userInfoModalBtn', function (){
|
||||||
document.searchForm.pageIndex.value = pageNo;
|
const userid = $(this.parentNode).find(".useridTd")[0].innerText;
|
||||||
document.searchForm.action = "<c:url value='/admin/userInfo' />";
|
$.ajax({
|
||||||
document.searchForm.submit();
|
url: '/admin/userInfo/'+userid,
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#userInfoModalBody").append(html);
|
||||||
|
userInfoModal.show();
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
function fn_link_page(pageNo) {
|
||||||
|
document.searchForm.pageIndex.value = pageNo;
|
||||||
|
document.searchForm.action = "<c:url value='/admin/userInfo' />";
|
||||||
|
document.searchForm.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmBtn(userid, auth){
|
||||||
|
$("#userid").val(userid);
|
||||||
|
$("#auth").val(auth);
|
||||||
|
|
||||||
|
var msg;
|
||||||
|
if(auth === "2"){
|
||||||
|
msg = "승인";
|
||||||
|
}else{
|
||||||
|
msg = "삭제";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm(msg+" 처리 하시겠습니까?")){
|
||||||
|
$("#updateFrm").submit();
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function confirmBtn(userid, auth){
|
$(function(){
|
||||||
$("#userid").val(userid);
|
$("#changePw").click(function(){
|
||||||
$("#auth").val(auth);
|
if($(this).is(":checked")){
|
||||||
|
$("#password").attr("disabled", false);
|
||||||
var msg;
|
$("#passwordCheck").attr("disabled", false);
|
||||||
if(auth == 2){
|
|
||||||
msg = "승인";
|
|
||||||
}else{
|
}else{
|
||||||
msg = "삭제";
|
$("#password").attr("disabled", true);
|
||||||
|
$("#passwordCheck").attr("disabled", true);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
if(confirm(msg+" 처리 하시겠습니까?")){
|
function update() {
|
||||||
$("#updateFrm").submit();
|
const changePw = $("#changePw").is(":checked");
|
||||||
}else{
|
const pw1 = $('#password');
|
||||||
return false;
|
const pw2 = $('#passwordCheck');
|
||||||
}
|
const name = $('#name');
|
||||||
}
|
const company = $('#company');
|
||||||
|
const tell = $('#phonenum');
|
||||||
|
const email_1 = $('#email');
|
||||||
|
|
||||||
|
if (changePw && pw1.val() === "") {
|
||||||
|
alert('비밀번호를 입력해주세요');
|
||||||
|
pw1.focus();
|
||||||
|
} else if (changePw && pw2.val() === "") {
|
||||||
|
alert('비밀번호를 입력해주세요');
|
||||||
|
pw2.focus();
|
||||||
|
} else if (changePw && (pw1.val() !== pw2.val())) {
|
||||||
|
alert('비밀번호가 일치하지 않습니다.');
|
||||||
|
pw1.focus();
|
||||||
|
} else if (name.val() === "") {
|
||||||
|
alert('이름을 입력해주세요');
|
||||||
|
name.focus();
|
||||||
|
} else if (company.val() === "") {
|
||||||
|
alert('소속기관을 입력해주세요');
|
||||||
|
company.focus();
|
||||||
|
} else if (tell.val() === "") {
|
||||||
|
alert('연락처를 입력해주세요');
|
||||||
|
tell.focus();
|
||||||
|
} else if (email_1.val() === "") {
|
||||||
|
alert('이메일을 입력해주세요');
|
||||||
|
email_1.focus();
|
||||||
|
} else {
|
||||||
|
$("#updateForm").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
|
|
||||||
$(function(){
|
|
||||||
$("#changePw").click(function(){
|
|
||||||
if($(this).is(":checked")){
|
|
||||||
$("#password").attr("disabled", false);
|
|
||||||
$("#passwordCheck").attr("disabled", false);
|
|
||||||
}else{
|
|
||||||
$("#password").attr("disabled", true);
|
|
||||||
$("#passwordCheck").attr("disabled", true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function update() {
|
|
||||||
var changePw = $("#changePw").is(":checked");
|
|
||||||
var pw1 = $('#password').val();
|
|
||||||
var pw2 = $('#passwordCheck').val();
|
|
||||||
var name = $('#name').val();
|
|
||||||
var company = $('#company').val();
|
|
||||||
var tell = $('#phonenum').val();
|
|
||||||
var email_1 = $('#email').val();
|
|
||||||
|
|
||||||
if (changePw && pw1 == "") {
|
|
||||||
alert('비밀번호를 입력해주세요');
|
|
||||||
$('#password').focus();
|
|
||||||
return;
|
|
||||||
} else if (changePw && pw2 == "") {
|
|
||||||
alert('비밀번호를 입력해주세요');
|
|
||||||
$('#passwordCheck').focus();
|
|
||||||
return;
|
|
||||||
} else if (changePw && (pw1 != pw2)) {
|
|
||||||
alert('비밀번호가 일치하지 않습니다.');
|
|
||||||
$('#pass').focus();
|
|
||||||
return;
|
|
||||||
} else if (name == "") {
|
|
||||||
alert('이름을 입력해주세요');
|
|
||||||
$('#name').focus();
|
|
||||||
return;
|
|
||||||
} else if (company == "") {
|
|
||||||
alert('소속기관을 입력해주세요');
|
|
||||||
$('#company').focus();
|
|
||||||
return;
|
|
||||||
} else if (tell == "") {
|
|
||||||
alert('연락처를 입력해주세요');
|
|
||||||
$('#phone_num').focus();
|
|
||||||
return;
|
|
||||||
} else if (email_1 == "") {
|
|
||||||
alert('이메일을 입력해주세요');
|
|
||||||
$('#email').focus();
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
$("#updateForm").submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue