mirror of
https://github.com/mrfluffy-dev/PRG381.git
synced 2026-01-17 02:10:33 +00:00
done bra
This commit is contained in:
39
target/classes/templates/update_user.html
Normal file
39
target/classes/templates/update_user.html
Normal 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>
|
||||
Reference in New Issue
Block a user