|
1 | | -<!DOCTYPE html> |
2 | | -<html xmlns="http://www.w3.org/1999/xhtml" |
3 | | - xmlns:th="http://www.thymeleaf.org"> |
4 | | -<head> |
5 | | -<title>Add Student</title> |
6 | | -</head> |
7 | | -<body> |
8 | | - <h1>Add Student</h1> |
9 | | - <form action="#" th:action="@{/saveStudent}" th:object="${student}" |
10 | | - method="post"> |
11 | | - <ul> |
12 | | - <li th:errors="*{id}" /> |
13 | | - <li th:errors="*{name}" /> |
14 | | - <li th:errors="*{gender}" /> |
15 | | - <li th:errors="*{percentage}" /> |
16 | | - </ul> |
17 | | - <table border="1"> |
18 | | - <tr> |
19 | | - <td><label th:text="#{msg.id}" /></td> |
20 | | - <td><input type="number" th:field="*{id}" /></td> |
21 | | - </tr> |
22 | | - <tr> |
23 | | - <td><label th:text="#{msg.name}" /></td> |
24 | | - <td><input type="text" th:field="*{name}" /></td> |
25 | | - </tr> |
26 | | - <tr> |
27 | | - <td><label th:text="#{msg.gender}" /></td> |
28 | | - <td><select th:field="*{gender}"> |
29 | | - <option th:value="'M'" th:text="Male"></option> |
30 | | - <option th:value="'F'" th:text="Female"></option> |
31 | | - </select></td> |
32 | | - </tr> |
33 | | - <tr> |
34 | | - <td><label th:text="#{msg.percent}" /></td> |
35 | | - <td><input type="text" th:field="*{percentage}" /></td> |
36 | | - </tr> |
37 | | - <tr> |
38 | | - <td><input type="submit" value="Submit" /></td> |
39 | | - </tr> |
40 | | - </table> |
41 | | - </form> |
42 | | -</body> |
43 | | -</html> |
| 1 | +<!DOCTYPE html> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" |
| 3 | + xmlns:th="http://www.thymeleaf.org"> |
| 4 | +<head> |
| 5 | +<title>Add Student</title> |
| 6 | +</head> |
| 7 | +<body> |
| 8 | + <h1>Add Student</h1> |
| 9 | + <form action="#" th:action="@{/saveStudent}" th:object="${student}" |
| 10 | + method="post"> |
| 11 | + <ul> |
| 12 | + <li th:errors="*{id}" /> |
| 13 | + <li th:errors="*{name}" /> |
| 14 | + <li th:errors="*{gender}" /> |
| 15 | + <li th:errors="*{percentage}" /> |
| 16 | + </ul> |
| 17 | + <table border="1"> |
| 18 | + <tr> |
| 19 | + <td><label th:text="#{msg.id}" /></td> |
| 20 | + <td><input type="number" th:field="*{id}" /></td> |
| 21 | + </tr> |
| 22 | + <tr> |
| 23 | + <td><label th:text="#{msg.name}" /></td> |
| 24 | + <td><input type="text" th:field="*{name}" /></td> |
| 25 | + </tr> |
| 26 | + <tr> |
| 27 | + <td><label th:text="#{msg.gender}" /></td> |
| 28 | + <td><select th:field="*{gender}"> |
| 29 | + <option th:value="'M'" th:text="Male"></option> |
| 30 | + <option th:value="'F'" th:text="Female"></option> |
| 31 | + </select></td> |
| 32 | + </tr> |
| 33 | + <tr> |
| 34 | + <td><label th:text="#{msg.percent}" /></td> |
| 35 | + <td><input type="text" th:field="*{percentage}" /></td> |
| 36 | + </tr> |
| 37 | + <tr> |
| 38 | + <td><input type="submit" value="Submit" /></td> |
| 39 | + </tr> |
| 40 | + </table> |
| 41 | + </form> |
| 42 | +</body> |
| 43 | +</html> |
0 commit comments