Browse Source

Death Certificate Form - added deceased and sex

Andrew Grant 4 tháng trước cách đây
mục cha
commit
815eb19ca2

+ 50 - 0
src/main/resources/templates/certificates/deathCertificate/form.html

@@ -157,6 +157,56 @@
                     </div>
                 </td>
             </tr>
+            <tr>
+                <td style="text-align: right;">
+                    <label for="deceased">Deceased :&nbsp;</label>
+                </td>
+                <td style="text-align: left;">
+                    <select id="deceased" name="deceased" th:field="*{deceased}">
+                        <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('deceased')}">
+                        <ul class="text-danger">
+                            <li th:each="err : ${#fields.errors('deceased')}" th:text="${err}"/>
+                        </ul>
+                    </div>
+                </td>
+            </tr>
+            <tr>
+                <td style="text-align: right;">
+                    <label for="sex">Sex :&nbsp;</label>
+                </td>
+                <td style="text-align: left;">
+                    <select id="sex" style="width: 200px;" name="sex" th:field="*{sex}">
+                        <option th:value="${''}" th:text="${''}"></option>
+                        <option th:each="value : ${T(scot.carricksoftware.grants.enums.general.Sex).values()}"
+                                th:value="${value}" th:text="${value.label}"></option>
+                    </select>
+                    <div th:if="${#fields.hasErrors('sex')}">
+                        <ul class="text-danger">
+                            <li th:each="err : ${#fields.errors('sex')}" th:text="${err}"/>
+                        </ul>
+                    </div>
+                </td>
+            </tr>
+            <tr>
+                <td style="text-align: right;">
+                    <label for="occupation">Occupation :&nbsp;</label>
+                </td>
+                <td style="text-align: left;">
+                    <div>
+                        <input class="occupation" id="occupation"
+                               th:field="*{occupation}" type="text">
+                        <div th:if="${#fields.hasErrors('occupation')}">
+                            <ul class="text-danger">
+                                <li th:each="err : ${#fields.errors('occupation')}" th:text="${err}"/>
+                            </ul>
+                        </div>
+                    </div>
+                </td>
+            </tr>
         </table>
             <button type="submit" class="btn btn-primary">Commit</button>
             <a class="btn btn-secondary" th:href="@{/deathCertificates}" th:text="${'List all'}">List all</a>