로그인 레이아웃 로그인 페이지 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:replace="~{common/components :: head}"></head>
|
||||
<section layout:fragment="script"></section>
|
||||
|
||||
<body>
|
||||
<div id="wrap">
|
||||
<div id="container" class = "login-wrap" layout:fragment="content">
|
||||
@@ -9,5 +9,6 @@
|
||||
</div>
|
||||
<section th:replace="~{common/components :: footer}"></section>
|
||||
</div>
|
||||
<section layout:fragment="script"></section>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content">
|
||||
<form method="post" th:action="@{/login}">
|
||||
|
||||
<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>
|
||||
<form method="post" th:action="@{/login}" name="loginForm">
|
||||
|
||||
<main id="content" role="main">
|
||||
<div class="inner">
|
||||
@@ -27,7 +21,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<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">
|
||||
</div>
|
||||
<ul class="input-info" id="username-error" style="display: none;">
|
||||
@@ -41,7 +35,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<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>
|
||||
<ul class="input-info" id="password-error" style="display: none;">
|
||||
<li>비밀번호를 입력해주세요</li>
|
||||
@@ -68,6 +62,20 @@
|
||||
<th:block layout:fragment="script">
|
||||
<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() {
|
||||
const passwordInput = this;
|
||||
const passwordValue = passwordInput.value;
|
||||
|
||||
Reference in New Issue
Block a user