This commit is contained in:
Jottyfan
2023-05-13 12:29:25 +02:00
parent 5b861f730f
commit 89cfbc6741
4 changed files with 110 additions and 49 deletions

View File

@ -12,70 +12,68 @@
<div class="card centered-card lindaborders" style="max-width: 48rem">
<div class="card-body">
<form th:action="@{/registration/register}" th:object="${bean}" method="post">
<span class="error" th:each="error : ${#fields.errors('fkCamp')}">[[${error}]]<br /></span>
<span class="error" th:each="error : ${#fields.errors('fkCamp')}">[[${error}]]</span>
<input type="hidden" th:field="*{fkCamp}" />
<div class="container">
<div class="row">
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('forename')}">[[${error}]]<br /></span>
<input type="text" placeholder="Vorname" th:field="*{forename}" th:class="${'form-control ' + (#fields.hasErrors('forename') ? 'inputerror' : '')}" />
<div>Vorname</div>
<input type="text" th:field="*{forename}" th:class="${'form-control ' + (#fields.hasErrors('forename') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('forename')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('surname')}">[[${error}]]<br /></span>
<input type="text" placeholder="Nachname" th:field="*{surname}" th:class="${'form-control ' + (#fields.hasErrors('surname') ? 'inputerror' : '')}" />
</div>
</div>
<div class="row">
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('sex')}">[[${error}]]<br /></span>
<select th:field="*{sex}" th:class="${'form-select ' + (#fields.hasErrors('sex') ? 'inputerror' : '')}">
<option value="">Geschlecht</option>
<option th:each="o : ${sexes}" th:value="${o.key}" th:text="${o.value}"></option>
</select>
<div>Nachname</div>
<input type="text" th:field="*{surname}" th:class="${'form-control ' + (#fields.hasErrors('surname') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('surname')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('birthDate')}">[[${error}]]<br /></span>
<input type="date" placeholder="Geburtsdatum" th:field="*{birthDate}" th:class="${'form-control ' + (#fields.hasErrors('birthDate') ? 'inputerror' : '')}" onfocus="this.type = 'date'" onblur="this.type = 'text'" />
</div>
</div>
<div class="row">
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('street')}">[[${error}]]<br /></span>
<input type="text" placeholder="Straße und Hausnummer" th:field="*{street}" th:class="${'form-control ' + (#fields.hasErrors('street') ? 'inputerror' : '')}" />
<div>Straße und Hausnummer</div>
<input type="text" th:field="*{street}" th:class="${'form-control ' + (#fields.hasErrors('street') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('street')}">[[${error}]]</span>
</div>
<div class="col-sm-2 rowdist">
<span class="error" th:each="error : ${#fields.errors('zip')}">[[${error}]]<br /></span>
<input type="text" placeholder="PLZ" th:field="*{zip}" th:class="${'form-control ' + (#fields.hasErrors('zip') ? 'inputerror' : '')}" />
<div>PLZ</div>
<input type="text" th:field="*{zip}" th:class="${'form-control ' + (#fields.hasErrors('zip') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('zip')}">[[${error}]]</span>
</div>
<div class="col-sm-4 rowdist">
<span class="error" th:each="error : ${#fields.errors('city')}">[[${error}]]<br /></span>
<input type="text" placeholder="Ort" th:field="*{city}" th:class="${'form-control ' + (#fields.hasErrors('city') ? 'inputerror' : '')}" />
</div>
</div>
<div class="row">
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('email')}">[[${error}]]<br /></span>
<input type="text" placeholder="E-Mail" th:field="*{email}" th:class="${'form-control ' + (#fields.hasErrors('email') ? 'inputerror' : '')}" />
<div>Ort</div>
<input type="text" th:field="*{city}" th:class="${'form-control ' + (#fields.hasErrors('city') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('city')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('phone')}">[[${error}]]<br /></span>
<input type="text" placeholder="Telefonnummer" th:field="*{phone}" th:class="${'form-control' + (#fields.hasErrors('phone') ? 'inputerror' : '')}" />
</div>
</div>
<div class="row">
<div class="col-sm-6 rowdist">
<span>mitkommen als</span>
<div>E-Mail</div>
<input type="text" th:field="*{email}" th:class="${'form-control ' + (#fields.hasErrors('email') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('email')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('campRole')}">[[${error}]]<br /></span>
<div>Telefonnummer</div>
<input type="text" th:field="*{phone}" th:class="${'form-control' + (#fields.hasErrors('phone') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('phone')}">[[${error}]]</span>
</div>
<div class="col-sm-4 rowdist">
<div>mitkommen als</div>
<select th:field="*{campRole}" th:class="${'form-select' + (#fields.hasErrors('campRole') ? 'inputerror' : '')}">
<option th:each="o : ${roles}" th:value="${o.key}" th:text="${o.value}"></option>
</select>
<span class="error" th:each="error : ${#fields.errors('campRole')}">[[${error}]]</span>
</div>
<div class="col-sm-4 rowdist">
<div>Geschlecht</div>
<select th:field="*{sex}" th:class="${'form-select ' + (#fields.hasErrors('sex') ? 'inputerror' : '')}">
<option value="">-- wählen --</option>
<option th:each="o : ${sexes}" th:value="${o.key}" th:text="${o.value}"></option>
</select>
<span class="error" th:each="error : ${#fields.errors('sex')}">[[${error}]]</span>
</div>
<div class="col-sm-4 rowdist">
<div>Geburtsdatum</div>
<input type="date" th:field="*{birthDate}" th:class="${'form-control ' + (#fields.hasErrors('birthDate') ? 'inputerror' : '')}" onfocus="this.type = 'date'" onblur="this.type = 'text'" />
<span class="error" th:each="error : ${#fields.errors('birthDate')}">[[${error}]]</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 rowdist">
<textarea class="form-control" placeholder="Sonstiges" th:field="*{comment}"></textarea>
<div>Sonstiges</div>
<textarea class="form-control" th:field="*{comment}"></textarea>
</div>
</div>
<div class="row" th:if="${#strings.isEmpty(currentUser)}">
@ -88,12 +86,29 @@
</div>
<div id="createlogin" class="row" th:if="${#strings.isEmpty(currentUser)}">
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('login')}">[[${error}]]<br /></span>
<input type="text" placeholder="E-Mail" th:field="*{login}" th:class="${'form-control ' + (#fields.hasErrors('login') ? 'inputerror' : '')}" />
<div>Nutzername</div>
<input type="text" th:field="*{login}" th:class="${'form-control ' + (#fields.hasErrors('login') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('login')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<span class="error" th:each="error : ${#fields.errors('password')}">[[${error}]]<br /></span>
<input type="password" placeholder="Passwort" th:field="*{password}" th:class="${'form-control ' + (#fields.hasErrors('password') ? 'inputerror' : '')}" />
<div>Passwort</div>
<input type="password" th:field="*{password}" th:class="${'form-control ' + (#fields.hasErrors('password') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('password')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<div>Vorname</div>
<input type="text" th:field="*{kcForename}" th:class="${'form-control ' + (#fields.hasErrors('kcForename') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('kcForename')}">[[${error}]]</span>
</div>
<div class="col-sm-6 rowdist">
<div>Nachname</div>
<input type="text" th:field="*{kcSurname}" th:class="${'form-control ' + (#fields.hasErrors('kcSurname') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('kcSurname')}">[[${error}]]</span>
</div>
<div class="col-sm-12 rowdist">
<div>E-Mail</div>
<input type="text" th:field="*{kcEmail}" th:class="${'form-control ' + (#fields.hasErrors('kcEmail') ? 'inputerror' : '')}" />
<span class="error" th:each="error : ${#fields.errors('kcEmail')}">[[${error}]]</span>
</div>
</div>
<div class="row">