로그인 레이아웃 로그인 페이지 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org">
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head th:replace="~{common/components :: head}"></head>
|
<head th:replace="~{common/components :: head}"></head>
|
||||||
<section layout:fragment="script"></section>
|
|
||||||
<body>
|
<body>
|
||||||
<div id="wrap">
|
<div id="wrap">
|
||||||
<div id="container" class = "login-wrap" layout:fragment="content">
|
<div id="container" class = "login-wrap" layout:fragment="content">
|
||||||
@@ -9,5 +9,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<section th:replace="~{common/components :: footer}"></section>
|
<section th:replace="~{common/components :: footer}"></section>
|
||||||
</div>
|
</div>
|
||||||
|
<section layout:fragment="script"></section>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -3,13 +3,7 @@
|
|||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<div layout:fragment="content">
|
<div layout:fragment="content">
|
||||||
<form method="post" th:action="@{/login}">
|
<form method="post" th:action="@{/login}" name="loginForm">
|
||||||
|
|
||||||
<div class="" th:if="${session['SPRING_SECURITY_LAST_EXCEPTION']} != null">
|
|
||||||
<div class="alert alert-danger fw-bold"
|
|
||||||
th:utext="${session['SPRING_SECURITY_LAST_EXCEPTION'].message}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<main id="content" role="main">
|
<main id="content" role="main">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
@@ -27,7 +21,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input autofocus class="" id="floatingInput" placeholder="임가번호를 입력해 주세요" value="11111"
|
<input autofocus class="" id="floatingInput" name="username" placeholder="임가번호를 입력해 주세요" value="11111"
|
||||||
type="number" maxlength="5">
|
type="number" maxlength="5">
|
||||||
</div>
|
</div>
|
||||||
<ul class="input-info" id="username-error" style="display: none;">
|
<ul class="input-info" id="username-error" style="display: none;">
|
||||||
@@ -41,7 +35,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" value="1111" maxlength="4">
|
<input type="password" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" value="1111" maxlength="4">
|
||||||
</div>
|
</div>
|
||||||
<ul class="input-info" id="password-error" style="display: none;">
|
<ul class="input-info" id="password-error" style="display: none;">
|
||||||
<li>비밀번호를 입력해주세요</li>
|
<li>비밀번호를 입력해주세요</li>
|
||||||
@@ -68,6 +62,20 @@
|
|||||||
<th:block layout:fragment="script">
|
<th:block layout:fragment="script">
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const errorMessage = /*[[${session['SPRING_SECURITY_LAST_EXCEPTION']?.message}]]*/ null;
|
||||||
|
if (errorMessage) {
|
||||||
|
etUI.dialog.alert({
|
||||||
|
message: "입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.",
|
||||||
|
type: "alert",
|
||||||
|
callback: function () {
|
||||||
|
document.loginForm.reset();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
document.getElementById('floatingPassword').addEventListener('focusout', function() {
|
document.getElementById('floatingPassword').addEventListener('focusout', function() {
|
||||||
const passwordInput = this;
|
const passwordInput = this;
|
||||||
const passwordValue = passwordInput.value;
|
const passwordValue = passwordInput.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user