diff --git a/src/main/resources/templates/editIndicator.html b/src/main/resources/templates/admin/editAspirant.html similarity index 100% rename from src/main/resources/templates/editIndicator.html rename to src/main/resources/templates/admin/editAspirant.html diff --git a/src/main/resources/templates/admin/editIndicator.html b/src/main/resources/templates/admin/editIndicator.html new file mode 100644 index 0000000..e45d045 --- /dev/null +++ b/src/main/resources/templates/admin/editIndicator.html @@ -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> diff --git a/src/main/resources/templates/editMeeting.html b/src/main/resources/templates/admin/editMeeting.html similarity index 100% rename from src/main/resources/templates/editMeeting.html rename to src/main/resources/templates/admin/editMeeting.html diff --git a/src/main/resources/templates/editNews.html b/src/main/resources/templates/admin/editNews.html similarity index 100% rename from src/main/resources/templates/editNews.html rename to src/main/resources/templates/admin/editNews.html