Files
EM-Spring/src/main/resources/templates/insertEmployeeConfirm.html
2026-09-09 09:27:11 +09:00

157 lines
5.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<!-- 外部のスクリプトファイルを読み込む -->
<script th:src="@{/js/common.js}"></script>
<!-- CSSの読み込み -->
<link rel="stylesheet" th:href="@{/css/all.css}">
<link rel=stylesheet th:href="@{/css/style.css}" type="text/css">
<title>登録内容確認</title>
</head>
<body>
<h1>登録内容確認   
<div class="rightSection">
<span class="loginInfo">ログイン者名:<span th:text="${session.loginUser.nmEmployee}"></span></span>
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
</h1>
<form action="insertEmployee"
id="insertForm"
method="post"
th:object="${insertEmployeeForm}">
<div class="msgBox error" th:if="${messageError != null}">
<span class="error" th:each="message : ${messageError.message}" th:text="${message}"></span>
</div>
<table>
<tr>
<th class="header">社員ID</th>
<td>
<label>
<input class="readOnly"
name="empId"
readonly="readonly"
type="text"
value="自動で設定されます"/>
</label>
</td>
</tr>
<tr>
<th class="header">社員名</th>
<td>
<label>
<input class="readOnly"
name="nmEmployee"
readonly="readonly"
th:value="*{nmEmployee}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">社員名フリガナ</th>
<td>
<label>
<input class="readOnly"
name="knEmployee"
readonly="readonly"
th:value="*{knEmployee}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">メールアドレス</th>
<td>
<label>
<input class="readOnly"
name="mailAddress"
readonly="readonly"
th:value="*{mailAddress}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">パスワード</th>
<td>
<label>
<input class="readOnly"
name="password"
readonly="readonly"
th:value="*{password}"
type="password"/>
</label>
</td>
</tr>
<tr>
<th class="header">管理者権限</th>
<td>
<label>
<input id="adminAuth1" name="adminAuth" onclick="return false;"
th:checked="${insertEmployeeForm .adminAuth == 1}" type="radio"
value="1"> 管理者権限
</label>
<label>
<input id="adminAuth0" name="adminAuth" onclick="return false;"
th:checked="${insertEmployeeForm.adminAuth == null or insertEmployeeForm.adminAuth == 0}"
type="radio"
value="0">
一般権限
</label>
</td>
</tr>
<tr>
<th class="header">所属部署</th>
<td>
<label>
<select name="idDepartment" required="required" th:field="*{idDepartment}">
<th:block th:each="department : ${departmentFormList}">
<th:block
th:if="${insertEmployeeForm.idDepartment != null && department.idDepartment == insertEmployeeForm.idDepartment}">
<option th:text="${department.nmDepartment}"
th:value="${department.idDepartment}">
</option>
</th:block>
</th:block>
</select>
</label>
</td>
</tr>
<tr>
<td class="btnArea" colspan="2">
<input type="submit" value="登録"/>
</td>
</tr>
</table>
<a href="javascript:onClickEdit()">登録内容の編集</a> | <a href="showMenu">メニューに戻る</a>
</form>
<script type="text/javascript">
function onClickEdit() {
const form = document.getElementById('insertForm');
form.setAttribute('method', 'post');
form.setAttribute('action', 'insertEmployeeInput');
// 確認画面から編集画面に戻ってきたときのフラグ(未使用)
const inputField = document.createElement("input");
inputField.setAttribute("type", "hidden");
inputField.setAttribute("name", "backFlg");
inputField.setAttribute("value", "edit");
form.appendChild(inputField);
// フォームをDOMに追加
document.body.appendChild(form);
form.submit();
}
</script>
</body>
</html>