[ADD]:ログイン・ログアウト機能実装

This commit is contained in:
h-seya
2026-09-24 16:04:12 +09:00
parent 21dd389deb
commit 004ea0d5b9
7 changed files with 206 additions and 61 deletions

View File

@@ -1,29 +1,35 @@
<!DOCTYPE html>
<html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>ログイン</title>
<meta charset="UTF-8">
<title>ログイン</title>
</head>
<body>
<h1>ログイン</h1>
<form action="doLogin"
method="post"
th:object="${loginInfoForm}">
<div class="msgBox error" th:if="${messageError} != null">
<span class="error" th:text="${messageError.message}"></span>
</div>
<p class="message message-error" th:if="${loginError}" th:text="${loginError}">
</p>
<table>
<tr>
<td class="btnArea" colspan="2">
<input type="submit" value="ログイン"/>
<button onclick="clearInput()">リセット</button>
</td>
</tr>
</table>
<form th:action="@{/login}" th:object="${loginForm}" method="post">
<div class="form-group">
<label for="employeeId">社員ID</label>
<input id="employeeId" type="text" th:field="*{employeeId}">
<p class="field-error" th:errors="*{employeeId}"></p>
</div>
<div class="form-group">
<label for="passwordHash">パスワード</label>
<input id="passwordHash" type="password" th:field="*{passwordHash}">
<p class="field-error" th:errors="*{passwordHash}"></p>
</div>
<input type="submit" value="ログイン">
<input type="reset" value="リセット">
</form>
</body>
</html>

View File

@@ -1,31 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>トップメニュー</title>
<meta charset="UTF-8">
<title>トップメニュー</title>
</head>
<body>
<div class="header-bar">
<div class="header-left">
ShareBooks
</div>
<div class="header-right">
<span class="user">
テストユーザー(一般)
</span>
<a class="button-link" th:href="@{/logout}">
ログアウト
</a>
</div>
</div>
<h1>
メインメニュー
</h1>
<!-- ===== 共通:社内図書一覧 ===== -->
<form method="post" name="社内図書一覧" action="book">
<a href="javascript:form1.submit()">リンク名</a>
<button type="submit" class="btn-book">
<form method="post" name="社内図書一覧" action="book">
<a href="javascript:form1.submit()">リンク名</a>
<button type="submit" class="btn-book">
<h3>社内図書一覧</h3>
<h3>社内図書一覧</h3>
<p>
登録されている図書の<br> 一覧を表示します。
</p>
</button>
</form>
<hr> <!--区切り線-->
<p>
登録されている図書の<br> 一覧を表示します。
</p>
</button>
</form>
<hr> <!--区切り線-->
<!-- ===== 共通:寄贈申請 ===== -->
<a class="card" href="/bookApproval">
<h3>寄贈申請</h3>
@@ -34,11 +58,11 @@
寄贈申請フォームの<br> 入力を行います。
</p>
</a>
<hr>
<!-- ===== 管理者のみ ===== -->
<a class="card" href="/bookInsert">
<h3>新規図書登録</h3>
@@ -49,19 +73,19 @@
</a>
<hr>
<a class="card" href="/lendList">
<h3>貸出中図書一覧</h3>
<p>
貸出中図書の<br> 一覧を表示します。
</p>
</p>
</a>
<hr>
<a class="card" href="/approvalReceive">
<h3>寄贈申請受信BOX</h3>
@@ -70,16 +94,17 @@
寄贈申請の<br> 受信一覧を確認します。
</p>
</a>
<hr>
<a class="card" href="/">
<a class="card" href="/passwordChange">
<h3>パスワード変更</h3>
<p>
初期パスワードを<br> 変更します。
</p>
</a>
</body>
</html>