mirror of
https://github.com/mrfluffy-dev/PRG381.git
synced 2026-01-17 10:20:33 +00:00
39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
<!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> |