98 lines
3.8 KiB
HTML
98 lines
3.8 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/saveAspirant}"
|
||
th:object="${aspirant}"
|
||
method="post">
|
||
<input type="hidden" th:field="*{id}">
|
||
<div class="form-group">
|
||
<label for="surname">Фамилия</label>
|
||
<input th:field="*{surname}"
|
||
id="surname"
|
||
type="text"
|
||
required
|
||
class="form-control"
|
||
placeholder="Фамилия">
|
||
<p th:if="${#fields.hasErrors('surname')}"
|
||
th:class="${#fields.hasErrors('surname')}? error">
|
||
Не может быть пустым
|
||
</p>
|
||
</div>
|
||
|
||
<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="patronymic">Отчество</label>
|
||
<input th:field="*{patronymic}"
|
||
id="patronymic"
|
||
type="text"
|
||
class="form-control"
|
||
placeholder="Отчество">
|
||
<p th:if="${#fields.hasErrors('patronymic')}"
|
||
th:class="${#fields.hasErrors('patronymic')}? error">
|
||
Не может быть пустым
|
||
</p>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="course">Курс</label>
|
||
<select class="form-select form-control"
|
||
id="course" aria-label="multiple select example"
|
||
th:field="*{course}">
|
||
<option th:each="c : ${courses}"
|
||
th:value="${c}"
|
||
th:text="${c.name}">
|
||
</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="theme">Тема</label>
|
||
<input th:field="*{theme}"
|
||
id="theme"
|
||
type="text"
|
||
class="form-control"
|
||
placeholder="Тема">
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="manager">Научный руководитель</label>
|
||
<select class="form-select form-control"
|
||
id="manager" aria-label="select example"
|
||
th:field="*{manager}">
|
||
<option th:each="m : ${managers}"
|
||
th:value="${m}"
|
||
th:text="${m.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/aspirants" 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>
|