forked from christian-hill-116/CLC-CST339
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.html
30 lines (24 loc) · 1.12 KB
/
login.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
</head>
<body>
<form action ="#" th:action="@{doLogin}" th:object="${loginModel}" method="POST">
<table>
<tr>
<td>Username:</td><td><input type="text" th:field="*{username}"></td> <td><h5 style="color: red;" if="${#fields.hasErrors('username')}" th:errors="*{username}">Username Error</h5></td>
</tr>
<tr>
<td>Password:</td><td><input type="text" th:field="*{password}"></td> <td><h5 style="color: red;" if="${#fields.hasErrors('password')}" th:errors="*{password}">Password Error</h5></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Login"></td>
</tr>
</table>
<div th:if="${#fields.hasErrors('*')}">List of Errors</div>
<div th:each="err : ${#fields.errors('*')}">
<span style="color: red;" th:text="${err}" class="fieldError"></span>
</div>
</form>
</body>
</html>