This commit is contained in:
m-shimizu
2026-10-21 14:27:40 +09:00
parent 7362f58c4f
commit 7d5d038a9e
4 changed files with 133 additions and 207 deletions

View File

@@ -4,41 +4,17 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>社員登録完了画面</title> <title>社員登録完了画面</title>
<link rel="stylesheet" th:href="@{/css/all.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
<style>
.complete-container {
width: 420px;
min-height: 140px;
margin: 50px auto;
padding: 20px;
border: 1px solid #ccc;
background-color: #eaf7f8;
}
.header {
display: flex;
justify-content: flex-end;
margin-bottom: 25px;
}
.message {
margin: 20px 0;
}
.back-link {
margin-top: 25px;
font-size: 13px;
}
</style>
</head> </head>
<body> <body>
<!-- 共通ヘッダー -->
<div th:replace="~{fragments/header :: header}"></div>
<main class="complete-container"> <main class="complete-container">
<div class="header"> <h2>社員登録完了</h2>
<form th:action="@{/logout}" method="post"> <p th:text="${message != null ? message : '社員登録が完了しました。'}">
<button type="submit">ログアウト</button> 社員登録が完了しました。
</form> </p>
</div> <a th:href="@{/menu}">メニューへ戻る</a>
<p class="message">社員登録が完了しました。</p>
<div class="back-link">
<a th:href="@{/menu}">メニューに戻る</a>
</div>
</main> </main>
</body> </body>
</html> </html>

View File

@@ -0,0 +1,79 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>社員登録確認画面</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<!-- 共通ヘッダー -->
<div th:replace="~{fragments/header :: header}"></div>
<main>
<h1>社員登録確認</h1>
<!-- エラーメッセージ -->
<div class="error"
th:if="${errors != null and !errors.isEmpty()}">
<p th:each="error : ${errors}"
th:text="${error}">
</p>
</div>
<div class="card">
<p>以下の内容で登録します。内容を確認してください。</p>
<!-- 登録ボタン -->
<form th:action="@{/admin/employees/new/execute}"
th:object="${form}"
method="post">
<table>
<tr>
<th>社員名</th>
<td th:text="*{nmEmployee}"></td>
</tr>
<tr>
<th>社員名よみ</th>
<td th:text="*{knEmployee}"></td>
</tr>
<tr>
<th>メールアドレス</th>
<td th:text="*{mailAddress}"></td>
</tr>
<tr>
<th>パスワード</th>
<td>********</td>
</tr>
<tr>
<th>権限</th>
<td th:text="*{flgAdmin == '1' ? '管理者' : '一般'}"></td>
</tr>
</table>
<!-- 登録処理に必要な値を引き継ぐ -->
<input type="hidden" th:field="*{nmEmployee}">
<input type="hidden" th:field="*{knEmployee}">
<input type="hidden" th:field="*{mailAddress}">
<input type="hidden" th:field="*{password}">
<input type="hidden" th:field="*{flgAdmin}">
<div class="actions">
<button type="submit" class="btn">
登録
</button>
</div>
</form>
<!-- 入力画面へ戻る -->
<form th:action="@{/admin/employees/new/input}"
th:object="${form}"
method="post">
<input type="hidden" th:field="*{nmEmployee}">
<input type="hidden" th:field="*{knEmployee}">
<input type="hidden" th:field="*{mailAddress}">
<input type="hidden" th:field="*{password}">
<input type="hidden" th:field="*{flgAdmin}">
<div class="back-link">
<button type="submit" class="sub">
社員情報入力に戻る
</button>
</div>
</form>
</div>
</main>
</body>
</html>

View File

@@ -1,95 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>社員登録確認画面</title>
<link rel="stylesheet" th:href="@{/css/all.css}">
<style>
.register-container {
width: 420px;
margin: 50px auto;
padding: 20px;
border: 1px solid #ccc;
background-color: #eaf7f8;
}
.header {
display: flex;
justify-content: flex-end;
margin-bottom: 25px;
}
.form-row {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.form-row label {
width: 130px;
font-size: 13px;
}
.form-row span {
font-size: 13px;
overflow-wrap: anywhere;
}
.role-row {
margin: 18px 0;
font-size: 13px;
}
.actions {
text-align: right;
margin: 20px 45px 10px 0;
}
.back-link {
margin-top: 25px;
font-size: 13px;
}
</style>
</head>
<body>
<main class="register-container">
<div class="header">
<form th:action="@{/logout}" method="post">
<button type="submit">ログアウト</button>
</form>
</div>
<h2>社員登録確認</h2>
<form th:action="@{/employees/register/complete}" method="post">
<div class="form-row">
<label>社員名</label>
<span th:text="${nmEmployee}"></span>
<input type="hidden" name="nmEmployee"
th:value="${nmEmployee}">
</div>
<div class="form-row">
<label>社員名よみ</label>
<span th:text="${knEmployee}"></span>
<input type="hidden" name="knEmployee"
th:value="${knEmployee}">
</div>
<div class="form-row">
<label>メールアドレス</label>
<span th:text="${mailAddress}"></span>
<input type="hidden" name="mailAddress"
th:value="${mailAddress}">
</div>
<div class="form-row">
<label>パスワード</label>
<span>********</span>
<input type="hidden" name="password"
th:value="${password}">
</div>
<div class="role-row">
<span th:text="${role}"></span>
<input type="hidden" name="role"
th:value="${role}">
</div>
<div class="actions">
<button type="submit">登録</button>
</div>
</form>
<div class="back-link">
<a th:href="@{/employees/register}">社員情報入力に戻る</a>
</div>
</main>
</body>
</html>

View File

@@ -3,101 +3,67 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>社員登録入力画面</title> <title>社員登録画面</title>
<link rel="stylesheet" th:href="@{/css/all.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
<style>
.register-container {
width: 420px;
margin: 50px auto;
padding: 20px;
border: 1px solid #ccc;
background-color: #eaf7f8;
}
.header {
display: flex;
justify-content: flex-end;
margin-bottom: 25px;
}
.form-row {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.form-row label {
width: 130px;
font-size: 13px;
}
.form-row input {
width: 180px;
box-sizing: border-box;
}
.role-row {
margin: 18px 0;
font-size: 13px;
}
.actions {
text-align: right;
margin: 20px 45px 10px 0;
}
.back-link {
margin-top: 25px;
font-size: 13px;
}
</style>
</head> </head>
<body> <body>
<main class="register-container"> <!-- 共通ヘッダー -->
<!-- ログアウト --> <div th:replace="~{fragments/header :: header}"></div>
<div class="header"> <!-- 社員登録入力画面 -->
<form th:action="@{/logout}" method="post"> <main>
<button type="submit">ログアウト</button>
</form>
</div>
<h2>社員登録</h2> <h2>社員登録</h2>
<!-- 社員情報入力 --> <!-- 入力エラー表示 -->
<form th:action="@{/employees/register/confirm}" method="post"> <div th:if="${errors != null and !errors.isEmpty()}">
<div class="form-row"> <p th:each="error : ${errors}"
th:text="${error}"
class="error">
</p>
</div>
<form th:action="@{/admin/employees/new/confirm}"
th:object="${form}"
method="post">
<div>
<label for="nmEmployee">社員名</label> <label for="nmEmployee">社員名</label>
<input type="text" id="nmEmployee" <input type="text"
name="nmEmployee" required> id="nmEmployee"
th:field="*{nmEmployee}">
</div> </div>
<div class="form-row"> <div>
<label for="knEmployee">社員名よみ</label> <label for="knEmployee">社員名よみ</label>
<input type="text" id="knEmployee" <input type="text"
name="knEmployee" required> id="knEmployee"
th:field="*{knEmployee}">
</div> </div>
<div class="form-row"> <div>
<label for="mailAddress">メールアドレス</label> <label for="mailAddress">メールアドレス</label>
<input type="email" id="mailAddress" <input type="email"
name="mailAddress" required> id="mailAddress"
th:field="*{mailAddress}">
</div> </div>
<div class="form-row"> <div>
<label for="password">パスワード</label> <label for="password">パスワード</label>
<input type="password" id="password" <input type="password"
name="password" required> id="password"
th:field="*{password}">
</div> </div>
<!-- 権限選択 --> <fieldset>
<div class="role-row"> <legend>権限</legend>
<label> <label>
<input type="radio" name="role" <input type="radio"
value="管理者" required> th:field="*{flgAdmin}"
value="0">
一般
</label>
<label>
<input type="radio"
th:field="*{flgAdmin}"
value="1">
管理者 管理者
</label> </label>
<label> </fieldset>
<input type="radio" name="role" <button type="submit">登録確認</button>
value="一般ユーザー">
一般ユーザー
</label>
</div>
<!-- 登録確認へ -->
<div class="actions">
<button type="submit">登録確認</button>
</div>
</form> </form>
<!-- メニューへ戻る --> <a th:href="@{/menu}">メニューへ戻る</a>
<div class="back-link">
<a th:href="@{/menu}">メニューへ戻る</a>
</div>
</main> </main>
</body> </body>
</html> </html>