Explorar el Código

Death Certificate Form - mother changed to dropdown

Andrew Grant hace 4 meses
padre
commit
4c8c97a444

+ 11 - 10
src/main/resources/templates/certificates/deathCertificate/form.html

@@ -457,18 +457,19 @@
                 <td style="text-align: right; background-color: #73ff00;">
                     <label for="mother">Mother :&nbsp;</label>
                 </td>
-                <td style="text-align: left;">
-                    <div>
-                        <input class="mother" id="mother"
-                               th:field="*{mother}" type="text">
-                        <div th:if="${#fields.hasErrors('mother')}">
-                            <ul class="text-danger">
-                                <li th:each="err : ${#fields.errors('mother')}" th:text="${err}"/>
-                            </ul>
-                        </div>
+		<td style="text-align: left;">
+                    <select id="mother" name="mother" th:field="*{mother}">
+                        <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('mother')}">
+                        <ul class="text-danger">
+                            <li th:each="err : ${#fields.errors('mother')}" th:text="${err}"/>
+                        </ul>
                     </div>
                 </td>
-            </tr>
+                     </tr>
             <tr>
                 <td style="text-align: right; background-color: #73ff00;">
                     <label for="untrackedMother">Mother (untracked) :&nbsp;</label>