This commit is contained in:
Zastian Pretorius
2022-08-29 19:32:02 +01:00
parent 7ab3526d50
commit d664201875
28 changed files with 346 additions and 10 deletions

View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="ISO-8859-1">
<title>Employee Management System</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1>Employee Management System</h1>
<hr>
<h2>Update Employee</h2>
<form action="#" th:action="@{/saveUser}" th:object="${user}"
method="POST" th:href="@{/admin}">
<!-- Add hidden form field to handle update -->
<input type="hidden" th:field="*{id}" />
<input type="text" th:field="*{firstName}" class="form-control mb-4 col-4">
<input type="text" th:field="*{lastName}" class="form-control mb-4 col-4">
<input type="text" th:field="*{email}" class="form-control mb-4 col-4">
<input type="text" th:field="*{password}" class="form-control mb-4 col-4">
<button type="submit" class="btn btn-info col-2" th:href = "@{/admin}"> Update User</button>
</form>
<hr>
<a th:href = "@{/admin}"> Back to User List</a>
</div>
</body>
</html>