회원가입 페이지 모달화. 아이디/비밀번호 찾기 작업중.
parent
dd5b3f0589
commit
4222d1e9ab
|
|
@ -88,7 +88,7 @@ public class CommonController {
|
||||||
@RequestMapping(value="/join")
|
@RequestMapping(value="/join")
|
||||||
public String join() throws Exception {
|
public String join() throws Exception {
|
||||||
try {
|
try {
|
||||||
return "join";
|
return "anonymous/html/join";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
@ -136,7 +136,7 @@ public class CommonController {
|
||||||
return "/redirect";
|
return "/redirect";
|
||||||
}else {
|
}else {
|
||||||
model.addAttribute("resultMsg", "오류가 발생하였습니다.");
|
model.addAttribute("resultMsg", "오류가 발생하였습니다.");
|
||||||
return "/join";
|
return null;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
|
@ -173,7 +173,7 @@ public class CommonController {
|
||||||
@RequestMapping(value = "findId")
|
@RequestMapping(value = "findId")
|
||||||
public String findIdView(){
|
public String findIdView(){
|
||||||
|
|
||||||
return "findId";
|
return "anonymous/findId";
|
||||||
}
|
}
|
||||||
// 아이디 찾기 실행
|
// 아이디 찾기 실행
|
||||||
|
|
||||||
|
|
@ -188,13 +188,13 @@ public class CommonController {
|
||||||
model.addAttribute("id", user.getUserid());
|
model.addAttribute("id", user.getUserid());
|
||||||
}
|
}
|
||||||
|
|
||||||
return "findId";
|
return "anonymous/findId";
|
||||||
|
|
||||||
}
|
}
|
||||||
//pw찾기 페이지 이동
|
//pw찾기 페이지 이동
|
||||||
@RequestMapping(value = "findPwd")
|
@RequestMapping(value = "findPwd")
|
||||||
public String findPwdView(){
|
public String findPwdView(){
|
||||||
return "findPwd";
|
return "anonymous/findPwd";
|
||||||
}
|
}
|
||||||
//pw찾기 실행
|
//pw찾기 실행
|
||||||
@RequestMapping(value = "findPwd", method = RequestMethod.POST)
|
@RequestMapping(value = "findPwd", method = RequestMethod.POST)
|
||||||
|
|
@ -207,7 +207,7 @@ public class CommonController {
|
||||||
model.addAttribute("check", 0);
|
model.addAttribute("check", 0);
|
||||||
model.addAttribute("updateid", user.getUserid());
|
model.addAttribute("updateid", user.getUserid());
|
||||||
}
|
}
|
||||||
return "findPwd";
|
return "anonymous/findPwd";
|
||||||
}
|
}
|
||||||
|
|
||||||
//pw 바꾸기 실행
|
//pw 바꾸기 실행
|
||||||
|
|
@ -217,7 +217,7 @@ public class CommonController {
|
||||||
userVO.setUserid(id);
|
userVO.setUserid(id);
|
||||||
System.out.println(userVO);
|
System.out.println(userVO);
|
||||||
userService.updatePwd(userVO);
|
userService.updatePwd(userVO);
|
||||||
return "findPwdConfirm";
|
return "anonymous/findPwdConfirm";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 비밀번호 변경 성공페이지 이동
|
// 비밀번호 변경 성공페이지 이동
|
||||||
|
|
@ -225,7 +225,7 @@ public class CommonController {
|
||||||
UserVO loginUser = (UserVO) session.getAttribute("loginUser");
|
UserVO loginUser = (UserVO) session.getAttribute("loginUser");
|
||||||
|
|
||||||
if (loginUser == null) {
|
if (loginUser == null) {
|
||||||
return "login";
|
return "/login";
|
||||||
} else {
|
} else {
|
||||||
return "checkform";
|
return "checkform";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,9 @@
|
||||||
<%@ page language="java" contentType="text/html; charset=utf-8"
|
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
|
||||||
pageEncoding="utf-8" %>
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||||
<%@ 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" %>
|
||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>모바일센터 관리시스템</title>
|
|
||||||
<script src="<c:out value="/js/jquery-3.5.1.min.js" />"></script>
|
|
||||||
<script src="<c:out value="/js/bootstrap-3.3.2.min.js" />"></script>
|
|
||||||
<link href="<c:out value="/css/normalize.css" />" rel="stylesheet">
|
|
||||||
<link href="<c:out value="/css/bootstrap.min.css" />" rel="stylesheet">
|
|
||||||
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header class="header">
|
|
||||||
<div class="header_title"><a href="/">모바일센터 관리시스템</a></div>
|
|
||||||
<div class="header_menu"></div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="loginWrap">
|
<div class="loginWrap">
|
||||||
<div class="loginBox">
|
<div class="loginBox">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
|
|
@ -51,12 +31,10 @@
|
||||||
<c:if test="${check == 0}">
|
<c:if test="${check == 0}">
|
||||||
<label>찾으시는 아이디는 ${userid}입니다</label>
|
<label>찾으시는 아이디는 ${userid}입니다</label>
|
||||||
</c:if>
|
</c:if>
|
||||||
<input class="btn" type="submit"><a href="login.jsp">로그인</a>
|
<input class="btn" type="submit"><a href="../login.jsp">로그인</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ 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" %>
|
||||||
|
<div class="loginBox">
|
||||||
|
<form method="POST" name="findForm">
|
||||||
|
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||||
|
<input type=hidden name=login_error value="${login_error}"/>
|
||||||
|
<p class="login_title text-white">모바일센터 관리시스템</p>
|
||||||
|
<p class="login_text">
|
||||||
|
<label>아이디<input type="text" class="form-control" name="userid" id="userid" value="" placeholder="아이디"/></label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="login_text">
|
||||||
|
<label>이름<input type="text" class="form-control" name="username" id="username" value="" placeholder="이름"/></label>
|
||||||
|
</p>
|
||||||
|
<p class="login_text">
|
||||||
|
<label>email<input type="tel" class="form-control" name="phonenum" id="phonenum" value="" placeholder="연락처"/></label>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input class="btn" type="submit" value="check">
|
||||||
|
</div>
|
||||||
|
<%-- 이름번호 일치x --%>
|
||||||
|
<c:if test="${check == 1}">
|
||||||
|
<script>
|
||||||
|
opener.document._findForm.id.value = "";
|
||||||
|
opener.document._findForm.name.value = "";
|
||||||
|
opener.document._findForm.phonenum.value = "";
|
||||||
|
</script>
|
||||||
|
<label>일치하는 정보가 없습니다.</label>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<c:if test="${check == 0}">
|
||||||
|
<div>
|
||||||
|
<label>비밀번호를 변경해주세요</label>
|
||||||
|
</div>
|
||||||
|
<p class="login_text">
|
||||||
|
<label>비밀번호<input type="password" class="form-control" name="password" id="password" value="" placeholder="비밀번호"/></label>
|
||||||
|
</p>
|
||||||
|
<p class="login_text">
|
||||||
|
<label>비밀번호확인<input type="password" class="form-control" name="passwordCheck" id="passwordCheck" value="" placeholder="비밀번호 확인"/></label>
|
||||||
|
</p>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<input class="btn" type="submit" value="update Pwd" onclick="updatePwd()">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
function updatePwd(){
|
||||||
|
if(password == "" || password == undefined || password == null){
|
||||||
|
alert("비밀번호를 입력해주세요")
|
||||||
|
} else if(passwordCheck == "" || passwordCheck == undefined || passwordCheck == null){
|
||||||
|
alert("비밀번호 확인을 입력해주세요")
|
||||||
|
|
||||||
|
} else {
|
||||||
|
document.findform.action = "updatepwd";
|
||||||
|
document.findform.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,156 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=utf-8"
|
||||||
|
pageEncoding="utf-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ 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="insertFrm" action="/insertUser" id="insertFrm" autocomplete="off"
|
||||||
|
method="post">
|
||||||
|
<table class="table join_table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="id">아이디</label>
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<input type="text" class="form-control" name="userid" id="id"/>
|
||||||
|
<span id="idMsg"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="password">비밀번호</label>
|
||||||
|
</th>
|
||||||
|
<td><input type="password" class="form-control" id="password" name="password" value=""/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="passwordCheck">비밀번호 확인</label>
|
||||||
|
</th>
|
||||||
|
<td><input type="password" class="form-control" id="passwordCheck" name="passwordCheck" value=""/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="name">이름</label>
|
||||||
|
</th>
|
||||||
|
<td><input type="text" class="form-control" name="name" id="name"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="company">소속기관</label>
|
||||||
|
</th>
|
||||||
|
<td><input type="text" class="form-control" name="company" id="company"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="phonenum">연락처</label>
|
||||||
|
</th>
|
||||||
|
<td><input type="tel" class="form-control" name="phonenum" id="phonenum"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label for="email">이메일</label>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<input type="email" class="form-control" name="email" id="email"/>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="join_bottom" style="padding-top: 10px">
|
||||||
|
<p>※ 회원 가입을 요청한 후에 승인을 기다려주세요.</p>
|
||||||
|
<p class="join_bottom_p"><input class="btn_join big on" type="submit" value="가입신청"
|
||||||
|
onclick="join(); return false;"/></p>
|
||||||
|
</div>
|
||||||
|
</form:form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var token = $("meta[name='_csrf']").attr("content");
|
||||||
|
var header = $("meta[name='_csrf_header']").attr("content");
|
||||||
|
|
||||||
|
var checkId = false;
|
||||||
|
var getId = RegExp(/^[a-zA-Z0-9]{5,12}$/);
|
||||||
|
var getMail = RegExp(/^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\-]+\.[A-Za-z0-9\-]+/);
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$("#id").focusout(function () {
|
||||||
|
var id = $(this).val();
|
||||||
|
if (id == "" || id == undefined || id == null) {
|
||||||
|
$("#idMsg").text("아이디를 입력해주세요.");
|
||||||
|
checkId = false;
|
||||||
|
return false;
|
||||||
|
} else if (!getId.test(id)) {
|
||||||
|
$("#idMsg").text("5~20자의 영문 소문자, 숫자만 사용 가능합니다.");
|
||||||
|
checkId = false;
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$.ajax({
|
||||||
|
url: "/userIdCheck",
|
||||||
|
type: "GET",
|
||||||
|
data: {
|
||||||
|
"checkId": id
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data == "duplicate") {
|
||||||
|
$("#idMsg").text("이미 존재하는 아이디 입니다.");
|
||||||
|
checkId = false;
|
||||||
|
} else if (data == "ok") {
|
||||||
|
$("#idMsg").text("사용 가능한 아이디 입니다.");
|
||||||
|
checkId = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (request, status, error) {
|
||||||
|
alert("접속 실패 관리자에게 문의해주세요.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function join() {
|
||||||
|
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 (!checkId) {
|
||||||
|
alert('아이디를 확인해주세요.');
|
||||||
|
$('#id').focus();
|
||||||
|
} else if (pw1 == "") {
|
||||||
|
alert('비밀번호를 입력해주세요');
|
||||||
|
$('#password').focus();
|
||||||
|
return;
|
||||||
|
} else if (pw2 == "") {
|
||||||
|
alert('비밀번호를 입력해주세요');
|
||||||
|
$('#passCheck').focus();
|
||||||
|
return;
|
||||||
|
} else if (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 {
|
||||||
|
$("#insertFrm").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
<%@ page language="java" contentType="text/html; charset=utf-8"
|
|
||||||
pageEncoding="utf-8" %>
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
||||||
<%@ 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" %>
|
|
||||||
|
|
||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>모바일센터 관리시스템</title>
|
|
||||||
<script src="<c:out value="/js/jquery-3.5.1.min.js" />"></script>
|
|
||||||
<script src="<c:out value="/js/bootstrap-3.3.2.min.js" />"></script>
|
|
||||||
<link href="<c:out value="/css/normalize.css" />" rel="stylesheet">
|
|
||||||
<link href="<c:out value="/css/bootstrap.min.css" />" rel="stylesheet">
|
|
||||||
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header class="header">
|
|
||||||
<div class="header_title"><a href="/">모바일센터 관리시스템</a></div>
|
|
||||||
<div class="header_menu"></div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="loginWrap">
|
|
||||||
<div class="loginBox">
|
|
||||||
<form method="POST" name="findForm">
|
|
||||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
|
||||||
<input type=hidden name=login_error value="${login_error}"/>
|
|
||||||
<p class="login_title text-white">모바일센터 관리시스템</p>
|
|
||||||
<p class="login_text">
|
|
||||||
<label>아이디<input type="text" class="form-control" name="userid" id="userid" value="" placeholder="아이디"/></label>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="login_text">
|
|
||||||
<label>이름<input type="text" class="form-control" name="username" id="username" value="" placeholder="이름"/></label>
|
|
||||||
</p>
|
|
||||||
<p class="login_text">
|
|
||||||
<label>email<input type="tel" class="form-control" name="phonenum" id="phonenum" value="" placeholder="연락처"/></label>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<input class="btn" type="submit" value="check">
|
|
||||||
</div>
|
|
||||||
<%-- 이름번호 일치x --%>
|
|
||||||
<c:if test="${check == 1}">
|
|
||||||
<script>
|
|
||||||
opener.document._findForm.id.value = "";
|
|
||||||
opener.document._findForm.name.value = "";
|
|
||||||
opener.document._findForm.phonenum.value = "";
|
|
||||||
</script>
|
|
||||||
<label>일치하는 정보가 없습니다.</label>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
<c:if test="${check == 0}">
|
|
||||||
<div>
|
|
||||||
<label>비밀번호를 변경해주세요</label>
|
|
||||||
</div>
|
|
||||||
<p class="login_text">
|
|
||||||
<label>비밀번호<input type="password" class="form-control" name="password" id="password" value="" placeholder="비밀번호"/></label>
|
|
||||||
</p>
|
|
||||||
<p class="login_text">
|
|
||||||
<label>비밀번호확인<input type="password" class="form-control" name="passwordCheck" id="passwordCheck" value="" placeholder="비밀번호 확인"/></label>
|
|
||||||
</p>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
<input class="btn" type="submit" value="update Pwd" onclick="updatePwd()">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
<script>
|
|
||||||
function updatePwd(){
|
|
||||||
if(password == "" || password == undefined || password == null){
|
|
||||||
alert("비밀번호를 입력해주세요")
|
|
||||||
} else if(passwordCheck == "" || passwordCheck == undefined || passwordCheck == null){
|
|
||||||
alert("비밀번호 확인을 입력해주세요")
|
|
||||||
|
|
||||||
} else {
|
|
||||||
document.findform.action = "updatepwd";
|
|
||||||
document.findform.submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,185 +0,0 @@
|
||||||
<%@ page language="java" contentType="text/html; charset=utf-8"
|
|
||||||
pageEncoding="utf-8" %>
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
||||||
<%@ 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" %>
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="ko">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>모바일센터 관리시스템</title>
|
|
||||||
<script src="<c:out value="/js/jquery-3.5.1.min.js" />"></script>
|
|
||||||
<script src="<c:out value="/js/bootstrap-3.3.2.min.js" />"></script>
|
|
||||||
<link href="<c:out value="/css/normalize.css" />" rel="stylesheet">
|
|
||||||
<link href="<c:out value="/css/bootstrap.min.css" />" rel="stylesheet">
|
|
||||||
<link href="<c:out value="/css/style.css" />" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header class="header">
|
|
||||||
<div class="header_title"><a href="/">모바일센터 관리시스템</a></div>
|
|
||||||
<div class="header_menu"></div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="join_section">
|
|
||||||
<div class="join_top">
|
|
||||||
<h2>
|
|
||||||
<span class="glyphicon glyphicon-edit"></span> 회원 정보 입력
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
<form:form commandName="userVO" name="insertFrm" action="/insertUser" id="insertFrm" autocomplete="off"
|
|
||||||
method="post">
|
|
||||||
<table class="join_table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="id">아이디</label>
|
|
||||||
</th>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
<input type="text" class="form-control" name="userid" id="id"/>
|
|
||||||
<span id="idMsg"></span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="password">비밀번호</label>
|
|
||||||
</th>
|
|
||||||
<td><input type="password" class="form-control" id="password" name="password" value=""/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="passwordCheck">비밀번호 확인</label>
|
|
||||||
</th>
|
|
||||||
<td><input type="password" class="form-control" id="passwordCheck" name="passwordCheck" value=""/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="name">이름</label>
|
|
||||||
</th>
|
|
||||||
<td><input type="text" class="form-control" name="name" id="name"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="company">소속기관</label>
|
|
||||||
</th>
|
|
||||||
<td><input type="text" class="form-control" name="company" id="company"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="phonenum">연락처</label>
|
|
||||||
</th>
|
|
||||||
<td><input type="tel" class="form-control" name="phonenum" id="phonenum"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<label for="email">이메일</label>
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<input type="email" class="form-control" name="email" id="email"/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="join_bottom" style="padding-top: 10px">
|
|
||||||
<p>※ 회원 가입을 요청한 후에 승인을 기다려주세요.</p>
|
|
||||||
<p class="join_bottom_p"><input class="btn_join big on" type="submit" value="가입신청"
|
|
||||||
onclick="join(); return false;"/></p>
|
|
||||||
</div>
|
|
||||||
</form:form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var token = $("meta[name='_csrf']").attr("content");
|
|
||||||
var header = $("meta[name='_csrf_header']").attr("content");
|
|
||||||
|
|
||||||
var checkId = false;
|
|
||||||
var getId = RegExp(/^[a-zA-Z0-9]{5,12}$/);
|
|
||||||
var getMail = RegExp(/^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\-]+\.[A-Za-z0-9\-]+/);
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
$("#id").focusout(function () {
|
|
||||||
var id = $(this).val();
|
|
||||||
if (id == "" || id == undefined || id == null) {
|
|
||||||
$("#idMsg").text("아이디를 입력해주세요.");
|
|
||||||
checkId = false;
|
|
||||||
return false;
|
|
||||||
} else if (!getId.test(id)) {
|
|
||||||
$("#idMsg").text("5~20자의 영문 소문자, 숫자만 사용 가능합니다.");
|
|
||||||
checkId = false;
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
$.ajax({
|
|
||||||
url: "/userIdCheck",
|
|
||||||
type: "GET",
|
|
||||||
data: {
|
|
||||||
"checkId": id
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
if (data == "duplicate") {
|
|
||||||
$("#idMsg").text("이미 존재하는 아이디 입니다.");
|
|
||||||
checkId = false;
|
|
||||||
} else if (data == "ok") {
|
|
||||||
$("#idMsg").text("사용 가능한 아이디 입니다.");
|
|
||||||
checkId = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (request, status, error) {
|
|
||||||
alert("접속 실패 관리자에게 문의해주세요.");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function join() {
|
|
||||||
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 (!checkId) {
|
|
||||||
alert('아이디를 확인해주세요.');
|
|
||||||
$('#id').focus();
|
|
||||||
} else if (pw1 == "") {
|
|
||||||
alert('비밀번호를 입력해주세요');
|
|
||||||
$('#password').focus();
|
|
||||||
return;
|
|
||||||
} else if (pw2 == "") {
|
|
||||||
alert('비밀번호를 입력해주세요');
|
|
||||||
$('#passCheck').focus();
|
|
||||||
return;
|
|
||||||
} else if (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 {
|
|
||||||
$("#insertFrm").submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -18,6 +18,9 @@
|
||||||
|
|
||||||
<header class="header row justify-content-between">
|
<header class="header row justify-content-between">
|
||||||
<div class="header_title col-auto">
|
<div class="header_title col-auto">
|
||||||
|
<sec:authorize access="isAnonymous()">
|
||||||
|
<a href="/login">모바일센터 관리시스템</a>
|
||||||
|
</sec:authorize>
|
||||||
<sec:authorize access="hasRole('ROLE_USER')">
|
<sec:authorize access="hasRole('ROLE_USER')">
|
||||||
<a href="/map/request">모바일센터 관리시스템</a>
|
<a href="/map/request">모바일센터 관리시스템</a>
|
||||||
</sec:authorize>
|
</sec:authorize>
|
||||||
|
|
|
||||||
|
|
@ -3,39 +3,71 @@
|
||||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||||
<%@ 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 type="text/javascript">
|
||||||
|
let multiModal;
|
||||||
|
$(function () {
|
||||||
|
multiModal = new bootstrap.Modal(document.getElementById('multiModal'));
|
||||||
|
// multiModal = document.getElementById('multiModal');
|
||||||
|
})
|
||||||
|
$(document).on('click', '.joinLink', function (){
|
||||||
|
getModalBody("/join", "회원가입");
|
||||||
|
})
|
||||||
|
|
||||||
|
function getModalBody(url, labelText){
|
||||||
|
$("#multiModalLabel").text(labelText);
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#multiModalBody").empty().append(html);
|
||||||
|
multiModal.show()
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<div class="loginWrap">
|
<div class="loginWrap">
|
||||||
<div class="loginBox">
|
<div class="loginBox">
|
||||||
<form method="POST" action="/j_spring_security_check">
|
<form method="POST" action="/j_spring_security_check">
|
||||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||||
<input type=hidden name=login_error value="${login_error}"/>
|
<input type=hidden name=login_error value="${login_error}"/>
|
||||||
<p class="login_title text-white">모바일센터 관리시스템</p>
|
<p class="login_title text-white">모바일센터 관리시스템</p>
|
||||||
<p class="login_text">
|
<p class="login_text">
|
||||||
<input type="text" class="form-control" name="username" id="user_id" value="" placeholder="사용자 ID"/>
|
<input type="text" class="form-control" name="username" id="user_id" value="" placeholder="사용자 ID"/>
|
||||||
</p>
|
</p>
|
||||||
<p class="login_text">
|
<p class="login_text">
|
||||||
<input type="password" class="form-control" name="password" id="user_pw" value="" placeholder="비밀번호"/>
|
<input type="password" class="form-control" name="password" id="user_pw" value="" placeholder="비밀번호"/>
|
||||||
</p>
|
</p>
|
||||||
<p class="login_btn">
|
<p class="login_btn">
|
||||||
<input type="image" src="images/login_.png"/>
|
<input type="image" src="images/login_.png"/>
|
||||||
</p>
|
</p>
|
||||||
|
<div class="row justify-content-between mx-3">
|
||||||
|
<div class="col-auto">
|
||||||
|
<a class="text-white" href="<c:url value="/findId" />">아이디 찾기</a>
|
||||||
|
<br>
|
||||||
|
<a class="text-white" href="<c:url value="/findPwd" />">비밀번호 찾기</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<%--<c:url value=" /join" />--%>
|
||||||
|
<a class="text-white joinLink" href="#">회원가입</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="parent">
|
<div class="modal fade" id="multiModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="multiModalLabel" aria-hidden="true">
|
||||||
<div class="find_id">
|
<div class="modal-dialog">
|
||||||
<span class="glyphicon glyphicon-info-sign"></span>
|
<div class="modal-content">
|
||||||
<a class="text-white" href="<c:url value="/findId" />">아이디 찾기</a>
|
<div class="modal-header">
|
||||||
</div>
|
<h5 class="modal-title" id="multiModalLabel"></h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="multiModalBody">
|
||||||
|
|
||||||
<div class="find_pw">
|
</div>
|
||||||
<span class="glyphicon glyphicon-info-sign"></span>
|
|
||||||
<a class="text-white" href="<c:url value="/findPwd" />">비밀번호 찾기</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="join">
|
|
||||||
<span class="glyphicon glyphicon-user"></span>
|
|
||||||
<a class="text-white" href="<c:url value=" /join" />">회원가입</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -19,13 +19,13 @@
|
||||||
<put-attribute name="left" value="/WEB-INF/jsp/layout/leftMenu.jsp" />
|
<put-attribute name="left" value="/WEB-INF/jsp/layout/leftMenu.jsp" />
|
||||||
</definition>
|
</definition>
|
||||||
|
|
||||||
<definition name="login" extends="loginTemplate">
|
<definition name="login" extends="loginTemplate">
|
||||||
<put-attribute name="center" value="/WEB-INF/jsp/login.jsp" />
|
<put-attribute name="center" value="/WEB-INF/jsp/login.jsp" />
|
||||||
</definition>
|
</definition>
|
||||||
|
|
||||||
<definition name="*/html/*" extends="empty">
|
<definition name="*/html/*" extends="empty">
|
||||||
<put-attribute name="center" value="/WEB-INF/jsp/{1}/{2}.jsp" />
|
<put-attribute name="center" value="/WEB-INF/jsp/{1}/{2}.jsp" />
|
||||||
</definition>
|
</definition>
|
||||||
|
|
||||||
<definition name="*/*" extends="mainTemplate">
|
<definition name="*/*" extends="mainTemplate">
|
||||||
<put-attribute name="center" value="/WEB-INF/jsp/{1}/{2}.jsp" />
|
<put-attribute name="center" value="/WEB-INF/jsp/{1}/{2}.jsp" />
|
||||||
|
|
|
||||||
|
|
@ -371,24 +371,19 @@ a {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.join_top{
|
.join_top{
|
||||||
width: 620px;
|
padding: 0 0 10px;
|
||||||
padding: 0px 0 10px;
|
|
||||||
line-height:30px;
|
line-height:30px;
|
||||||
margin-bottom: 15px;
|
margin: 0 auto 15px;
|
||||||
margin: 0 auto;
|
|
||||||
}
|
}
|
||||||
.join_table{
|
.join_table{
|
||||||
width: 620px;
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-top: 2px solid #d9d9d9;
|
border-top: 2px solid #d9d9d9;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.join_bottom{
|
.join_bottom{
|
||||||
width: 620px;
|
padding: 0 0 10px;
|
||||||
padding: 0px 0 10px;
|
|
||||||
line-height:30px;
|
line-height:30px;
|
||||||
margin-bottom: 15px;
|
margin: 0 auto 15px;
|
||||||
margin: 0 auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue