Prechádzať zdrojové kódy

Death Certificate Form - father changed to dropdown

Andrew Grant 4 mesiacov pred
rodič
commit
a6018bc853

+ 9 - 8
src/main/resources/templates/certificates/deathCertificate/form.html

@@ -409,14 +409,15 @@
                     <label for="father">Father :&nbsp;</label>
                 </td>
                 <td style="text-align: left;">
-                    <div>
-                        <input class="father" id="father"
-                               th:field="*{father}" type="text">
-                        <div th:if="${#fields.hasErrors('father')}">
-                            <ul class="text-danger">
-                                <li th:each="err : ${#fields.errors('father')}" th:text="${err}"/>
-                            </ul>
-                        </div>
+                    <select id="father" name="father" th:field="*{father}">
+                        <option th:value="${''}" th:text="${''}"></option>
+                        <option th:each="person : ${people}"
+                                th:value="${person.id}" th:text="${person.toString()}"></option>
+                    </select>
+                    <div th:if="${#fields.hasErrors('father')}">
+                        <ul class="text-danger">
+                            <li th:each="err : ${#fields.errors('father')}" th:text="${err}"/>
+                        </ul>
                     </div>
                 </td>
             </tr>