seminar/src/main/resources/templates/admin/editReportPeriod.html

50 lines
2.0 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}">
<div class="container" layout:fragment="content">
<h3>Редактирование отчетного периода:</h3>
<form action="#" th:action="@{/admin/saveReportPeriod}"
th:object="${reportPeriod}"
method="post">
<input type="hidden" th:field="*{id}">
<div class="form-group">
<label for="startDate">Дата начала</label>
<input th:field="*{startDate}"
id="startDate"
type="date"
required
class="form-control">
<p th:if="${#fields.hasErrors('startDate')}"
th:class="${#fields.hasErrors('startDate')}? error">
Ошибка
</p>
</div>
<div class="form-group">
<label for="endDate">Дата окончания</label>
<input th:field="*{endDate}"
id="endDate"
type="date"
required
class="form-control">
<p th:if="${#fields.hasErrors('endDate')}"
th:class="${#fields.hasErrors('endDate')}? error">
Ошибка
</p>
</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="/admin/reportPeriodList" class="btn btn-outline-dark">Отмена</a>
</form>
<link rel="stylesheet" href="/webjars/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link rel="stylesheet" href="/webjars/bootstrap-glyphicons/bdd2cbfba0/css/bootstrap-glyphicons.css"/>
</div>
</html>