fix(backend): Reflect formElementSection changes in thymeleaf template

This commit is contained in:
2025-06-07 09:12:44 +02:00
parent ccd3c05314
commit 0a252aa4df

View File

@@ -52,11 +52,30 @@
margin-bottom: 15px; margin-bottom: 15px;
} }
.form-element { .form-section {
margin-bottom: 20px; margin-bottom: 30px;
} }
.form-element h3 { .form-section h3 {
font-size: 1.2em;
color: #444;
margin-bottom: 10px;
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
}
.form-section p.description {
font-style: italic;
color: #666;
margin: 5px 0 15px;
}
.form-element {
margin-bottom: 20px;
margin-left: 20px;
}
.form-element h4 {
font-size: 1.1em; font-size: 1.1em;
margin-bottom: 5px; margin-bottom: 5px;
} }
@@ -101,14 +120,19 @@
<div class="contract-section"> <div class="contract-section">
<h2>Formularelemente</h2> <h2>Formularelemente</h2>
<div th:each="elem : ${applicationForm.formElements}" class="form-element"> <div th:each="section : ${applicationForm.formElementSections}" class="form-section">
<h3 th:text="${elem.title}"></h3> <h3 th:text="${section.title}"></h3>
<p class="description" th:if="${elem.description}" th:text="${elem.description}"></p> <p class="description" th:if="${section.description}" th:text="${section.description}"></p>
<div th:each="elem : ${section.formElements}" class="form-element">
<h4 th:text="${elem.title}"></h4>
<p class="description" th:if="${elem.description}" th:text="${elem.description}"></p>
<ul> <ul>
<li th:each="option : ${elem.options}" th:if="${option.value == 'true'}" th:text="${option.label}"></li> <li th:each="option : ${elem.options}" th:if="${option.value == 'true'}" th:text="${option.label}"></li>
</ul> </ul>
<p th:if="${elem.options.?[value == 'true'].isEmpty()}">Keine Auswahl getroffen</p> <p th:if="${elem.options.?[value == 'true'].isEmpty()}">Keine Auswahl getroffen</p>
</div>
</div> </div>
</div> </div>