not yet finished manipulations of camp registrations
This commit is contained in:
122
src/main/resources/templates/admin/camp_edit.html
Normal file
122
src/main/resources/templates/admin/camp_edit.html
Normal file
@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
<div sec:authorize="hasRole('admin')">
|
||||
<form th:action="@{/admin/camp/update}" th:object="${bean}" method="post" enctype="multipart/form-data">
|
||||
<div class="tablebox">
|
||||
<div class="container">
|
||||
<input type="hidden" th:field="*{pk}" />
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alter-danger" th:if="${error}" th:text="${error}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputName" class="col-sm-2 col-form-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('name')}">[[${error}]]<br /></span> <input id="inputName" type="text" th:field="*{name}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('name') ? 'inputerror' : '')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputLocation" class="col-sm-2 col-form-label">Ort</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('fkLocation')}">[[${error}]]<br /></span>
|
||||
<select id="inputLocation" th:field="*{fkLocation}" th:class="${'form-select ' + (#fields.hasErrors('fkLocation') ? 'inputerror' : '')}">
|
||||
<option value="">--- bitte wählen ---</option>
|
||||
<option th:each="l : ${locations}" th:value="${l.pk}" th:text="${l.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputArrive" class="col-sm-2 col-form-label">von</label>
|
||||
<div class="col-sm-4">
|
||||
<span class="error" th:each="error : ${#fields.errors('arrive')}">[[${error}]]<br /></span> <input id="inputArrive" type="date" th:field="*{arrive}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('arrive') ? 'inputerror' : '')}">
|
||||
</div>
|
||||
<label for="inputDepart" class="col-sm-2 col-form-label">bis</label>
|
||||
<div class="col-sm-4">
|
||||
<span class="error" th:each="error : ${#fields.errors('depart')}">[[${error}]]<br /></span> <input id="inputDepart" type="date" th:field="*{depart}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('depart') ? 'inputerror' : '')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputMinAge" class="col-sm-2 col-form-label">Mindestalter</label>
|
||||
<div class="col-sm-4">
|
||||
<span class="error" th:each="error : ${#fields.errors('minAge')}">[[${error}]]<br /></span> <input id="inputMinAge" type="number" th:field="*{minAge}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('minAge') ? 'inputerror' : '')}">
|
||||
</div>
|
||||
<label for="inputMaxAge" class="col-sm-2 col-form-label">Maximalalter</label>
|
||||
<div class="col-sm-4">
|
||||
<span class="error" th:each="error : ${#fields.errors('maxAge')}">[[${error}]]<br /></span> <input id="inputMaxAge" type="number" th:field="*{maxAge}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('maxAge') ? 'inputerror' : '')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputPrice" class="col-sm-2 col-form-label">Preis</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('price')}">[[${error}]]<br /></span> <textarea id="inputPrice" type="text" th:field="*{price}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('price') ? 'inputerror' : '')}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputCountries" class="col-sm-2 col-form-label">Ferien in</label>
|
||||
<div class="col-sm-10"><!-- TODO: input helper for finding Bundesland by typing -->
|
||||
<span class="error" th:each="error : ${#fields.errors('countries')}">[[${error}]]<br /></span> <textarea id="inputCountries" type="text" th:field="*{countries}"
|
||||
th:class="${'form-control ' + (#fields.hasErrors('countries') ? 'inputerror' : '')}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputDoc" class="col-sm-2 col-form-label">Bestätigung</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('fkDocument')}">[[${error}]]<br /></span> <select id="inputDoc" th:field="*{fkDocument}"
|
||||
th:class="${'form-select ' + (#fields.hasErrors('fkDocument') ? 'inputerror' : '')}">
|
||||
<option value="">--- bitte wählen ---</option>
|
||||
<option th:each="d : ${documents}" th:value="${d.pk}" th:text="${d.name}"></option>
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
$("#inputDoc").select2({
|
||||
theme : 'bootstrap-5',
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputProfile" class="col-sm-2 col-form-label">Verantwortlicher</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('fkProfile')}">[[${error}]]<br /></span> <select id="inputProfile" th:field="*{fkProfile}"
|
||||
th:class="${'form-select ' + (#fields.hasErrors('fkProfile') ? 'inputerror' : '')}">
|
||||
<option value="">--- bitte wählen ---</option>
|
||||
<option th:each="p : ${profiles}" th:value="${p.pk}" th:text="${p.forename} + ' ' + ${p.surname}"></option>
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
$("#inputProfile").select2({
|
||||
theme : 'bootstrap-5',
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO: lock sales - boolean - Kassenschluss -->
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-10">
|
||||
<input type="submit" class="btn btn-success" value="Ok" />
|
||||
<a th:href="@{/admin/camp}" class="btn btn-outline-secondary">Abbrechen</a>
|
||||
<div class="dropdown" style="display: inline" th:if="${bean.pk}">
|
||||
<button class="btn btn-outline-danger dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" th:href="@{/admin/camp/delete/{id}(id=${bean.pk})}">Freizeit endgültig löschen</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user