This commit is contained in:
m-shimizu
2026-10-21 16:26:55 +09:00
parent 103acf1106
commit b36bce38e1
3 changed files with 163 additions and 90 deletions

View File

@@ -12,7 +12,7 @@
<div class="info" th:text="${message} ?: '処理が完了しました。'"></div> <div class="info" th:text="${message} ?: '処理が完了しました。'"></div>
<p> <p>
<a class="btn" th:href="@{${backUrl}}" th:text="${backLabel}">戻る</a> <a class="btn" th:href="@{${backUrl}}" th:text="${backLabel}">戻る</a>
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a> <!-- <a class="btn sub" th:href="@{/menu}">メニューに戻る</a>-->
</p> </p>
</main> </main>
</body> </body>

View File

@@ -1,16 +1,22 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> <html xmlns:th="http://www.thymeleaf.org">
<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/style.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
</head> </head>
<body> <body>
<!-- 共通ヘッダー --> <!-- 共通ヘッダー -->
<div th:replace="~{fragments/header :: header}"></div> <div th:replace="~{fragments/header :: header}"></div>
<main> <main>
<h1>社員登録確認</h1> <h2>社員登録確認</h2>
<!-- エラーメッセージ --> <!-- エラーメッセージ -->
<div class="error" <div class="error"
th:if="${errors != null and !errors.isEmpty()}"> th:if="${errors != null and !errors.isEmpty()}">
@@ -18,62 +24,77 @@
th:text="${error}"> th:text="${error}">
</p> </p>
</div> </div>
<!-- 登録内容確認 -->
<div class="card"> <div class="card">
<p>以下の内容で登録します。内容を確認してください。</p> <p>以下の内容で登録します。内容を確認してください。</p>
<!-- 登録ボタン -->
<form th:action="@{/admin/employees/new/execute}" <form th:action="@{/admin/employees/new/execute}"
th:object="${form}" th:object="${form}"
method="post"> method="post">
<!-- 登録内容一覧 -->
<table> <table>
<tbody>
<tr> <tr>
<th>社員名</th> <th>社員名</th>
<td th:text="*{nmEmployee}"></td> <td th:text="*{nmEmployee}"></td>
</tr> </tr>
<tr> <tr>
<th>社員名よみ</th> <th>社員名よみ</th>
<td th:text="*{knEmployee}"></td> <td th:text="*{knEmployee}"></td>
</tr> </tr>
<tr> <tr>
<th>メールアドレス</th> <th>メールアドレス</th>
<td th:text="*{mailAddress}"></td> <td th:text="*{mailAddress}"></td>
</tr> </tr>
<tr> <tr>
<th>パスワード</th> <th>パスワード</th>
<td>********</td> <td>********</td>
</tr> </tr>
<tr> <tr>
<th>権限</th> <th>権限</th>
<td th:text="*{flgAdmin == '1' ? '管理者' : '一般'}"></td> <td th:text="*{flgAdmin == '1' ? '管理者' : '一般'}"></td>
</tr> </tr>
</tbody>
</table> </table>
<!-- 登録処理に必要な値を引き継ぐ --> <!-- 登録処理に必要な値を引き継ぐ -->
<input type="hidden" th:field="*{nmEmployee}"> <input type="hidden" th:field="*{nmEmployee}">
<input type="hidden" th:field="*{knEmployee}"> <input type="hidden" th:field="*{knEmployee}">
<input type="hidden" th:field="*{mailAddress}"> <input type="hidden" th:field="*{mailAddress}">
<input type="hidden" th:field="*{password}"> <input type="hidden" th:field="*{password}">
<input type="hidden" th:field="*{flgAdmin}"> <input type="hidden" th:field="*{flgAdmin}">
<div class="actions">
<!-- ボタン:左に戻る、右に登録 -->
<div style="display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 20px;">
<!-- 社員情報入力に戻る -->
<a class="btn sub"
th:href="@{/admin/employees/new}">
社員情報入力に戻る
</a>
<!-- 登録 -->
<button type="submit" class="btn"> <button type="submit" class="btn">
登録 登録
</button> </button>
</div> </div>
</form> </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> </div>
</main> </main>
</body> </body>
</html> </html>

View File

@@ -1,69 +1,121 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> <html xmlns:th="http://www.thymeleaf.org">
<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/style.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
</head> </head>
<body> <body>
<!-- 共通ヘッダー --> <!-- 共通ヘッダー -->
<div th:replace="~{fragments/header :: header}"></div> <div th:replace="~{fragments/header :: header}"></div>
<!-- 社員登録入力画面 -->
<main> <main>
<h2>社員登録</h2> <h2>社員登録</h2>
<!-- 入力エラー表示 --> <!-- 入力エラー表示 -->
<div th:if="${errors != null and !errors.isEmpty()}"> <div class="error"
th:if="${errors != null and !errors.isEmpty()}">
<p th:each="error : ${errors}" <p th:each="error : ${errors}"
th:text="${error}" th:text="${error}">
class="error">
</p> </p>
</div> </div>
<!-- 社員登録フォーム -->
<div class="card">
<form th:action="@{/admin/employees/new/confirm}" <form th:action="@{/admin/employees/new/confirm}"
th:object="${form}" th:object="${form}"
method="post"> method="post">
<!-- 社員名 -->
<div> <div>
<label for="nmEmployee">社員名</label> <label for="nmEmployee">社員名</label>
<input type="text" <input type="text"
id="nmEmployee" id="nmEmployee"
th:field="*{nmEmployee}"> th:field="*{nmEmployee}">
</div> </div>
<!-- 社員名よみ -->
<div> <div>
<label for="knEmployee">社員名よみ</label> <label for="knEmployee">社員名よみ</label>
<input type="text" <input type="text"
id="knEmployee" id="knEmployee"
th:field="*{knEmployee}"> th:field="*{knEmployee}">
</div> </div>
<!-- メールアドレス -->
<div> <div>
<label for="mailAddress">メールアドレス</label> <label for="mailAddress">メールアドレス</label>
<input type="email" <input type="email"
id="mailAddress" id="mailAddress"
th:field="*{mailAddress}"> th:field="*{mailAddress}">
</div> </div>
<!-- パスワード -->
<div> <div>
<label for="password">パスワード</label> <label for="password">パスワード</label>
<input type="password" <input type="password"
id="password" id="password"
th:field="*{password}"> th:field="*{password}">
</div> </div>
<fieldset>
<legend>権限</legend> <!-- 権限:枠線なし・横並び -->
<label> <div style="border: none;
<input type="radio" display: flex;
th:field="*{flgAdmin}" flex-direction: row;
value="0"> align-items: center;
一般 gap: 25px;
</label> margin: 15px 0 25px;">
<label>
<label style="display: inline-flex;
align-items: center;
gap: 5px;
white-space: nowrap;">
<input type="radio" <input type="radio"
th:field="*{flgAdmin}" th:field="*{flgAdmin}"
value="1"> value="1">
管理者 管理者
</label> </label>
</fieldset>
<button type="submit">登録確認</button> <label style="display: inline-flex;
align-items: center;
gap: 5px;
white-space: nowrap;">
<input type="radio"
th:field="*{flgAdmin}"
value="0">
一般ユーザー
</label>
</div>
<!-- ボタン:左に戻る・右に確認 -->
<div style="display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 20px;">
<a class="btn sub"
th:href="@{/menu}">
メニューに戻る
</a>
<button type="submit" class="btn">
確認
</button>
</div>
</form> </form>
<a th:href="@{/menu}">メニューへ戻る</a>
</div>
</main> </main>
</body> </body>
</html> </html>