142 lines
7.3 KiB
HTML
142 lines
7.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
|
|
<head>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container" layout:fragment="content">
|
|
|
|
<section id="paper">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-12 text-center">
|
|
<h2 class="section-heading text-uppercase">Редактирование проекта</h2>
|
|
<div th:replace="projects/fragments/projectNavigationFragment"/>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<form id="project-form" method="post" th:action="@{'/projects/project?id='+ *{id == null ? '' : id} + ''}"
|
|
th:object="${projectDto}">
|
|
<div class="row">
|
|
<div class="col-md-6 col-sm-12">
|
|
<input type="hidden" name="id" th:field="*{id}"/>
|
|
<div class="form-group">
|
|
<label for="title">Название:</label>
|
|
<input class="form-control" id="title" type="text"
|
|
placeholder="Название проекта"
|
|
th:field="*{title}"/>
|
|
<p th:if="${#fields.hasErrors('title')}" th:errors="*{title}"
|
|
class="alert alert-danger">Incorrect title</p>
|
|
<p class="help-block text-danger"></p>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="status">Статус:</label>
|
|
<select class="form-control" th:field="*{status}" id="status">
|
|
<option th:each="status : ${allStatuses}" th:value="${status}"
|
|
th:text="${status.statusName}">Status
|
|
</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="description">Описание:</label>
|
|
<textarea class="form-control" rows="3" id="description"
|
|
th:field="*{description}"></textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="createGrant">Добавить грант:</label>
|
|
<div th:if="*{grant} == null">
|
|
<input type="submit" id="createGrant" name="createGrant" class="btn btn-primary"
|
|
value="Добавить грант"/>
|
|
</div>
|
|
<input type = "hidden" th:field="*{grant.id}"/>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="repository">Ссылка на репозиторий:</label>
|
|
<input class="form-control" id="repository" type="text"
|
|
placeholder="http://"
|
|
th:field="*{repository}"/>
|
|
<p th:if="${#fields.hasErrors('repository')}" th:errors="*{repository}"
|
|
class="alert alert-danger">Incorrect repository link</p>
|
|
<p class="help-block text-danger"></p>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Дедлайны показателей:</label>
|
|
<div class="row">
|
|
<input type="hidden"/>
|
|
<div class="col-6">
|
|
<input type="date" class="form-control" name="deadline"/>
|
|
</div>
|
|
<div class="col-4">
|
|
<input class="form-control" type="text" placeholder="Описание"/>
|
|
</div>
|
|
<div class="col-2">
|
|
<a class="btn btn-danger float-right"><span
|
|
aria-hidden="true"><i class="fa fa-times"/></span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<p th:if="${#fields.hasErrors('deadlines')}" th:errors="*{deadlines}"
|
|
class="alert alert-danger">Incorrect title</p>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="submit" id="addDeadline" name="addDeadline" class="btn btn-primary" value="Добавить
|
|
дедлайн"/>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="loader">Загрузить файл:</label>
|
|
<div id="loader">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
<div class="col-lg-12">
|
|
<div class="form-group">
|
|
<button id="sendMessageButton" name="save" class="btn btn-success text-uppercase"
|
|
type="submit">
|
|
Сохранить
|
|
</button>
|
|
<button id="cancelButton" class="btn btn-default text-uppercase" href="/projects/projects">
|
|
Отмена
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<script type="text/javascript" src="/js/file-loader.js"></script>
|
|
<script>
|
|
/*<![CDATA[*/
|
|
$(document).ready(function () {
|
|
new FileLoader({
|
|
div: "loader",
|
|
url: urlFileUpload,
|
|
maxSize: 2,
|
|
extensions: ["doc", "docx", "xls", "jpg", "png", "pdf", "txt"],
|
|
callback: function (response) {
|
|
showFeedbackMessage("Файл успешно загружен");
|
|
console.debug(response);
|
|
}
|
|
});
|
|
$('.selectpicker').selectpicker();
|
|
});
|
|
/*]]>*/
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|