회원정보 모달 크기 수정.

페이지네이션 링크 이상동작 수정.
master
강석 최 2022-03-11 10:53:25 +09:00
parent 47484b9622
commit 41a7350deb
4 changed files with 113 additions and 109 deletions

View File

@ -10,7 +10,7 @@
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="userid" value="${userVO.userid}"/>
<table class="join_table">
<table class="table join_table">
<tbody>
<tr>
<th>아이디</th>

View File

@ -3,113 +3,117 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<form:form commandName="userVO" name="updateForm" action="/map/userUpdate" id="updateForm" method="post">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<input type="hidden" name="userid" value="${userVO.userid}" />
<div class="section_content">
<div class="join_top">
<h2><span class="glyphicon glyphicon-edit"></span> 회원 정보 수정</h2>
</div>
<table class="join_table">
<tbody>
<tr>
<th>아이디</th>
<td>${userVO.userid}</td>
</tr>
<tr>
<th>비밀번호</th>
<td>
<p><label><input type="checkbox" id="changePw" /> 비밀번호 변경</<label></p>
<input type="password" class="form-control" id="password" name="password" value="" disabled="true" />
</td>
</tr>
<tr>
<th>비밀번호 확인</th>
<td><input type="password" class="form-control" id="passwordCheck" name="passwordCheck" value="" disabled="true" />
</td>
</tr>
<tr>
<th>이름</th>
<td><input type="text" class="form-control" name="name" id="name" value="${userVO.name}" /></td>
</tr>
<tr>
<th>소속기관</th>
<td><input type="text" class="form-control" name="company" id="company" value="${userVO.company}" /></td>
</tr>
<tr>
<th>연락처</th>
<td><input type="text" class="form-control" name="phonenum" id="phonenum" value="${userVO.phonenum}"/></td>
</tr>
<tr>
<th>이메일</th>
<td>
<div>
<input type="text" class="form-control" name="email" id="email" value="${userVO.email}" />
</div>
</td>
</tr>
</tbody>
</table>
<div class="join_top" style="margin-top:20px;">
<p class="search_p2">
<input class="btn btn-success" type="button" value="수정" onclick="update();" />
</p>
</div>
</div>
</form:form>
<style>
.section_content{
width: 620px;
}
</style>
<form:form commandName="userVO" name="updateForm" action="/map/userUpdate" id="updateForm" method="post">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<input type="hidden" name="userid" value="${userVO.userid}" />
<div class="section_content ms-5">
<div class="join_top">
<h2><span class="glyphicon glyphicon-edit"></span> 회원 정보 수정</h2>
</div>
<table class="table join_table">
<tbody>
<tr>
<th>아이디</th>
<td>${userVO.userid}</td>
</tr>
<tr>
<th>비밀번호</th>
<td>
<p><label><input type="checkbox" id="changePw" /> 비밀번호 변경</label></p>
<input type="password" class="form-control" id="password" name="password" value="" disabled="true" />
</td>
</tr>
<tr>
<th>비밀번호 확인</th>
<td><input type="password" class="form-control" id="passwordCheck" name="passwordCheck" value="" disabled="true" />
</td>
</tr>
<tr>
<th>이름</th>
<td><input type="text" class="form-control" name="name" id="name" value="${userVO.name}" /></td>
</tr>
<tr>
<th>소속기관</th>
<td><input type="text" class="form-control" name="company" id="company" value="${userVO.company}" /></td>
</tr>
<tr>
<th>연락처</th>
<td><input type="text" class="form-control" name="phonenum" id="phonenum" value="${userVO.phonenum}"/></td>
</tr>
<tr>
<th>이메일</th>
<td>
<div>
<input type="text" class="form-control" name="email" id="email" value="${userVO.email}" />
</div>
</td>
</tr>
</tbody>
</table>
<div class="join_top" style="margin-top:20px;">
<p class="search_p2">
<input class="btn btn-success" type="button" value="수정" onclick="update();" />
</p>
</div>
</div>
</form:form>
<script>
$(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(){
$("#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();
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();
}
}
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();
}
}
</script>

View File

@ -58,7 +58,7 @@ $(document).on("click", ".statusTab", function () {
function fn_link_page(pageNo) {
document.searchForm.pageIndex.value = pageNo;
document.searchForm.action = "<c:url value='/admin/fieldData' />";
document.searchForm.action = "/admin/fieldData";
document.searchForm.submit();
}

View File

@ -21,7 +21,7 @@ $(document).on('click', '.userInfoModalBtn', function () {
function fn_link_page(pageNo) {
document.searchForm.pageIndex.value = pageNo;
document.searchForm.action = "<c:url value='/admin/userInfo' />";
document.searchForm.action = "/admin/userInfo";
document.searchForm.submit();
}