# Conflicts:
#	book-rent/src/main/resources/templates/employeeUpdateConfirm.html
This commit is contained in:
2026-10-21 14:26:59 +09:00
3 changed files with 95 additions and 32 deletions

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<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="${errorMessage}" th:text="${errorMessage}"></div>
<div class="error" th:each="e : ${errors}" th:text="${e}"></div>
<div class="card">
<form th:action="@{/employees/search}" method="post">
<label for="mailAddress">メールアドレス(256文字以内)</label>
<input type="text" id="mailAddress" name="mailAddress" th:value="${mailAddress}">
<p><button type="submit">検索</button>
<a class="btn sub" th:href="@{/menu}">メニューに戻る</a>
</p>
</form>
</div>
</main>
</body>
</html>

View File

@@ -3,18 +3,17 @@
<head>
<meta charset="UTF-8">
<title>書籍情報確認</title>
<title>社員編集確認</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<div th:replace="~{fragments/header :: header}"></div>
<main>
<h1>社員情報確認</h1>
<h1>社員編集確認</h1>
<div class="card">
<form th:action="@{${base + '/input'}}" method="post" style="display:inline">
<h2 th:text="${title}">社員編集</h2>
<table>
<table>
<th:block th:if="${admin}">
<tr>
<th>社員名</th>
<td th:text="${form.nmEmployee}"></td>
@@ -25,20 +24,44 @@
</tr>
<tr>
<th>メールアドレス</th>
<td th:text="${form.mailaddress}"></td>
<td th:text="${form.mailAddress}"></td>
</tr>
<tr>
<th>パスワード</th>
<td th:text="${form.password}"></td>
<th>管理者フラグ</th>
<td th:text="${form.flgAdmin == '1'} ? '1:管理者' : '0:一般'"></td>
</tr>
</table>
<tr>
<th>退職フラグ</th>
<td th:text="${form.flgRetirement == '1'} ? '1:退職' : '0:所属'"></td>
</tr>
</th:block>
<tr>
<th>パスワード</th>
<td th:text="${#strings.isEmpty(form.password)} ? '(変更しない)' : '********'"></td>
</tr>
</table>
<form th:action="@{/employees/edit/execute}" method="post" style="display:inline">
<input type="hidden" name="idEmployee" th:value="${form.idEmployee}">
<input type="hidden" name="nmEmployee" th:value="${form.nmEmployee}">
<input type="hidden" name="knEmployee" th:value="${form.knEmployee}">
<input type="hidden" name="mailaddress" th:value="${form.mailAddress}">
<input type="hidden" name="mailAddress" th:value="${form.mailAddress}">
<input type="hidden" name="flgAdmin" th:value="${form.flgAdmin}">
<input type="hidden" name="flgRetirement" th:value="${form.flgRetirement}">
<input type="hidden" name="password" th:value="${form.password}">
<button type="submit">編集</button>
</form>
<form th:action="@{/employees/edit/input}" method="post" style="display:inline">
<input type="hidden" name="idEmployee" th:value="${form.idEmployee}">
<input type="hidden" name="nmEmployee" th:value="${form.nmEmployee}">
<input type="hidden" name="knEmployee" th:value="${form.knEmployee}">
<input type="hidden" name="mailAddress" th:value="${form.mailAddress}">
<input type="hidden" name="flgAdmin" th:value="${form.flgAdmin}">
<input type="hidden" name="flgRetirement" th:value="${form.flgRetirement}">
<input type="hidden" name="password" th:value="${form.password}">
<button type="submit" class="sub">社員情報入力に戻る</button>
</form>
</div>
</main>
</body>
</html>

View File

@@ -3,38 +3,49 @@
<head>
<meta charset="UTF-8">
<title>社員更新情報入力</title>
<title>社員編集</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<div th:replace="~{fragments/header :: header}"></div>
<main>
<h1>社員更新情報入力</h1>
<h1>社員編集</h1>
<div class="error" th:if="${errorMessage}" th:text="${errorMessage}"></div>
<div class="error" th:each="e : ${errors}" th:text="${e}"></div>
<div class="card">
<h2 th:text="${title}">社員更新</h2>
<form th:action="@{${base + '/confirm'}}" method="post">
<label for="nmEmployee">社員名(必須・50文字以内)</label>
<input type="text" id="nmEmployee" name="nmEmployee" th:value="${form.nmEmployee}" maxlength="50">
<label for="knEmployee">社員名読み(必須・100文字以内)</label>
<input type="text" id="knEmployee" name="knEmployee" th:value="${form.knEmployee}" maxlength="100">
<label for="mailAddress">メールアドレス(256文字以内)</label>
<input type="text" id="mailAddress" name="mailAddress" th:value="${form.mailAddress}" maxlength="256">
<label for="password">パスワード(256文字以内)</label>
<input type="text" id=" password" name=" password" th:value="${form. password}" maxlength="256">
<input type="radio" name="employee" value="adimin"> 管理者
<input type="radio" name="employee" value="user"> 一般ユーザー
<input type="radio" name="join" value="affiliation"> 所属
<input type="radio" name="join" value="quit"> 退職
</form>
<p><button type="submit" th:text="${title} + '確認'">確認</button>
<a class="btn sub" th:href="@{/employeeSearch}">メールアドレスの入力に戻る</a>
</p>
<form th:action="@{/employees/edit/confirm}" method="post">
<input type="hidden" name="idEmployee" th:value="${form.idEmployee}">
<th:block th:if="${admin}">
<label for="nmEmployee">社員名(必須・50文字以内)</label>
<input type="text" id="nmEmployee" name="nmEmployee" th:value="${form.nmEmployee}" maxlength="50">
<label for="knEmployee">社員名よみ(必須・100文字以内)</label>
<input type="text" id="knEmployee" name="knEmployee" th:value="${form.knEmployee}" maxlength="100">
<label for="mailAddress">メールアドレス(必須)</label>
<input type="text" id="mailAddress" name="mailAddress" th:value="${form.mailAddress}"
maxlength="256">
<label for="flgAdmin">管理者フラグ</label>
<select id="flgAdmin" name="flgAdmin">
<option value="0" th:selected="${form.flgAdmin == '0'}">0:一般</option>
<option value="1" th:selected="${form.flgAdmin == '1'}">1:管理者</option>
</select>
<label for="flgRetirement">退職フラグ</label>
<select id="flgRetirement" name="flgRetirement">
<option value="0" th:selected="${form.flgRetirement == '0'}">0:所属</option>
<option value="1" th:selected="${form.flgRetirement == '1'}">1:退職</option>
</select>
<label for="password">パスワード(変更する場合のみ入力)</label>
</th:block>
<th:block th:unless="${admin}">
<p>※パスワードのみ変更できます。</p>
<label for="password">新しいパスワード(必須)</label>
</th:block>
<input type="password" id="password" name="password" maxlength="256" autocomplete="new-password">
<p><button type="submit">編集確認</button>
<a class="btn sub" th:href="@{/menu}">メニューへ戻る</a>
</p>
</form>
</div>
</main>
</body>