diff options
Diffstat (limited to 'spring-boot/10-role-based-security/src/main/resources/templates/security/user-form.html')
| -rw-r--r-- | spring-boot/10-role-based-security/src/main/resources/templates/security/user-form.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spring-boot/10-role-based-security/src/main/resources/templates/security/user-form.html b/spring-boot/10-role-based-security/src/main/resources/templates/security/user-form.html new file mode 100644 index 0000000..a27ae7d --- /dev/null +++ b/spring-boot/10-role-based-security/src/main/resources/templates/security/user-form.html @@ -0,0 +1,22 @@ +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" + th:replace="~{layout/main :: layout(title='User', content=~{::main})}"> + +<body> + <main> + <form th:action="@{/security/user/update}" th:object="${userForm}" method="post"> + <!-- Hidden field binds the "id" property seamlessly --> + <input type="hidden" th:field="*{id}" /> + + <div class="form-field-container"> + <label>Description</label> + <textarea th:field="*{description}" placeholder="Description"></textarea> + <div class="validation-error" th:if="${#fields.hasErrors('description')}" th:errors="*{description}"></div> + </div> + + <button type="submit">Save</button> + </form> + </main> +</body> + +</html>
\ No newline at end of file |
