Add aspirant edit templates
This commit is contained in:
parent
da65669c90
commit
232dc68db4
76
src/main/resources/templates/admin/editIndicator.html
Normal file
76
src/main/resources/templates/admin/editIndicator.html
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<!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/saveIndicator}"
|
||||||
|
th:object="${indicator}"
|
||||||
|
method="post"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
<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 for="name">Максимальная сумма баллов</label>
|
||||||
|
<input th:field="*{max}"
|
||||||
|
required
|
||||||
|
id="max"
|
||||||
|
type="number"
|
||||||
|
class="form-control"
|
||||||
|
min="0"
|
||||||
|
max="30">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name">Описание подтверждающих документов</label>
|
||||||
|
<textarea th:field="*{proofDocuments}"
|
||||||
|
required
|
||||||
|
id="proofDocuments"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="Описание подтверждающих документов"
|
||||||
|
style="height: 100px">
|
||||||
|
</textarea>
|
||||||
|
<p th:if="${#fields.hasErrors('proofDocuments')}"
|
||||||
|
th:class="${#fields.hasErrors('proofDocuments')}? error">
|
||||||
|
Не может быть пустым
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="courses">Для каких курсов применяется</label>
|
||||||
|
|
||||||
|
<select class="form-select form-control" id="courses" multiple aria-label="multiple select example"
|
||||||
|
th:field="*{courses}"
|
||||||
|
>
|
||||||
|
<option th:each="c : ${courses}"
|
||||||
|
th:value="${c}"
|
||||||
|
th:text="${c.name}">
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</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/indicators" 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>
|
Loading…
Reference in New Issue
Block a user