Add another aspirant fields
This commit is contained in:
parent
a503a36e8b
commit
4d1844d256
@ -9,7 +9,7 @@
|
||||
<ul>
|
||||
<li th:each="a : ${aspirants}">
|
||||
<a th:href="@{'/admin/editAspirant/' + ${a.id}}">
|
||||
<span th:text="{${a.surname} + ' '+ ${a.name} + ' ' + ${a.patronymic}}"></span>
|
||||
<span th:text="${a.surname} + ' '+ ${a.name} + ' ' + ${a.patronymic}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -3,20 +3,33 @@
|
||||
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">
|
||||
<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="name">Название</label>
|
||||
<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="Название показателя">
|
||||
placeholder="Имя">
|
||||
<p th:if="${#fields.hasErrors('name')}"
|
||||
th:class="${#fields.hasErrors('name')}? error">
|
||||
Не может быть пустым
|
||||
@ -24,36 +37,23 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">Максимальная сумма баллов</label>
|
||||
<input th:field="*{max}"
|
||||
required
|
||||
id="max"
|
||||
type="number"
|
||||
<label for="patronymic">Отчество</label>
|
||||
<input th:field="*{patronymic}"
|
||||
id="patronymic"
|
||||
type="text"
|
||||
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">
|
||||
placeholder="Отчество">
|
||||
<p th:if="${#fields.hasErrors('patronymic')}"
|
||||
th:class="${#fields.hasErrors('patronymic')}? 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}"
|
||||
>
|
||||
<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}">
|
||||
@ -61,14 +61,35 @@
|
||||
</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('Удалить показатель?')">
|
||||
onclick="return confirm('Удалить запись?')">
|
||||
Удалить
|
||||
</button>
|
||||
<a href="/admin/indicators" class="btn btn-outline-dark">Отмена</a>
|
||||
<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"/>
|
||||
|
@ -60,6 +60,7 @@
|
||||
aria-haspopup="true" aria-expanded="false">Администратору</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="/admin/indicators">Список показателей</a>
|
||||
<a class="dropdown-item" href="/admin/aspirants">Список аспирантов</a>
|
||||
<a class="dropdown-item" href="/admin">Новости и заседания</a>
|
||||
</div>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user