40 lines
1.7 KiB
HTML
40 lines
1.7 KiB
HTML
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||
<html
|
||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
||
layout:decorate="~{default}">
|
||
<head>
|
||
<title>Редактирование проекта</title>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||
</head>
|
||
<div class="container" layout:fragment="content">
|
||
<h3>Редактирование проекта:</h3>
|
||
<form th:action="@{/project/save}" th:object="${project}" method="post">
|
||
<input type="hidden" th:field="*{id}">
|
||
<div class="form-group">
|
||
<label for="name">Название</label>
|
||
<input th:field="*{name}"
|
||
id="name"
|
||
type="text"
|
||
required
|
||
class="form-control"
|
||
placeholder="Название">
|
||
<p th:if="${#fields.hasErrors('name')}"
|
||
th:class="${#fields.hasErrors('name')}? error">
|
||
Не может быть пустым
|
||
</p>
|
||
</div>
|
||
<div class="form-group">
|
||
<label th:text="'Дата создания: ' + ${#dates.format(project.createDate, 'dd.MM.yyyy HH:mm')}"></label>
|
||
</div>
|
||
<button name="save" type="submit" class="btn btn-outline-dark">Сохранить</button>
|
||
<button name="delete"
|
||
type="submit"
|
||
class="btn btn-outline-dark"
|
||
onclick="return confirm('Удалить запись?')">
|
||
Удалить
|
||
</button>
|
||
<a href="/project/list" class="btn btn-outline-dark">Отмена</a>
|
||
</form>
|
||
</div>
|
||
</html>
|