2021-03-16 13:50:29 +04:00
|
|
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
|
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
|
layout:decorate="~{default}">
|
2021-03-16 09:43:46 +04:00
|
|
|
<head>
|
|
|
|
<title>Простая обработка формы на Spring MVC</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
|
|
</head>
|
2021-03-16 13:50:29 +04:00
|
|
|
<div class="container" layout:fragment="content">
|
|
|
|
<h1>Форма</h1>
|
|
|
|
<form action="#" th:action="@{/sendEmail}" th:object="${emailForm}" method="post">
|
|
|
|
<p style="color:red" th:text="${error}"></p>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Тема:</td>
|
|
|
|
<td><input type="text" th:field="*{subject}"/></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Кому:</td>
|
|
|
|
<td><input type="text" th:field="*{to}"/></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Сообщение:</td>
|
|
|
|
<td><textarea th:field="*{message}"/></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2"><input type="submit" value="Отправить"/></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
2021-03-16 09:43:46 +04:00
|
|
|
</html>
|