Prechádzať zdrojové kódy

CertificateDate changed to String

Andrew Grant 6 mesiacov pred
rodič
commit
485deaf2ee

+ 58 - 54
src/main/resources/templates/certificates/birthCertificate/form.html

@@ -28,54 +28,61 @@
             <p>Please Correct The Errors Below</p>
         </div>
 
-        <div class="form-group row justify-content-center">
-            <div class="col-xl-3  col-md-3">
-                <label for="certificateNumber">Certificate Number</label>
-                <input class="form-control" id="certificateNumber"
-                       th:field="*{id}" type="text">
-                <div th:if="${#fields.hasErrors('certificateNumber')}">
-                    <ul class="text-danger">
-                        <li th:each="err : ${#fields.errors('certificateNumber')}" th:text="${err}"/>
-                    </ul>
-                </div>
-            </div>
-
-            <div class="col-xl-3  col-md-3">
-                <label for="certificateIssuedAt">Issued At</label>
-                <div>
-                    <select id="certificateIssuedAt"  name="certificateIssuedAt"
-                            th:field="*{certificateIssuedAt}">
-                        <option th:value="${''}" th:text="${''}"></option>
-                        <option th:each="place : ${places}"
-                                th:value="${place.id}" th:text="${place.toString()}"></option>
-                    </select>
-                    <div th:if="${#fields.hasErrors('certificateIssuedAt')}">
-                        <ul class="text-danger">
-                            <li th:each="err : ${#fields.errors('certificateIssuedAt')}" th:text="${err}"/>
-                        </ul>
+        <table>
+            <tr>
+                <td style = "text-align: right;">
+                    <label for="id">Database Id &nbsp;<span style="color: rgb(255,0,0);">*</span></label>
+                </td>
+                <td style = "text-align: left;">
+                    <input class="form-control" id="id"
+                           th:field="*{id}" type="text" readonly>
+                </td>
+            </tr>
+            <tr>
+                <td style = "text-align: right;">
+                    <label for="certificateNumber">Certificate Number&nbsp;</label>
+                </td>
+                <td style = "text-align: left;">
+                    <input class="form-control" id="certificateNumber"
+                           th:field="*{certificateNumber}" type="text" readonly>
+                </td>
+            </tr>
+            <tr>
+                <td style = "text-align: right;">
+                    <label for="certificateIssuedAt">Issued From&nbsp;</label>
+                </td>
+                <td style = "text-align: left;">
+                    <div>
+                        <select id="certificateIssuedAt" name="place" th:field="*{certificateIssuedAt}">
+                            <option th:value="${''}" th:text="${''}"></option>
+                            <option th:each="place : ${places}"
+                                    th:value="${place.id}" th:text="${place.toString()}"></option>
+                        </select>
+                        <div th:if="${#fields.hasErrors('certificateIssuedAt')}">
+                            <ul class="text-danger">
+                                <li th:each="err : ${#fields.errors('certificateIssuedAt')}" th:text="${err}"/>
+                            </ul>
+                        </div>
                     </div>
-                </div>
-            </div>
-            <div class="col-xl-4  col-md-4">
-                <label for="certificateDate">On</label>
-                <input class="form-control" id="certificateDate"
-                       th:field="*{certificateDate}" type="date" th:value="*{certificateDate}">
-                <div th:if="${#fields.hasErrors('certificateDate')}">
-                    <ul class="text-danger">
-                        <li th:each="err : ${#fields.errors('certificateDate')}" th:text="${err}"/>
-                    </ul>
-                </div>
-            </div>
-
-        </div>
-
-        <div class="form-group row justify-content-center">
-            <div class="col-xl-6  col-md-6" style="margin-right:20px;">
-                <label for="newBorn">Person</label>
-                <div>
-                    <select id="newBorn" name="newBorn" th:field="*{newBorn}">
+                </td>
+            </tr>
+            <tr>
+                <td style = "text-align: right;">
+                    <label for="certificateDate">Issued At (dd/mm/yyyy)&nbsp;</label>
+                </td>
+                <td style = "text-align: left;">
+                    <input class="form-control" id="certificateDate"
+                           th:field="*{certificateDate}" type="text">
+                </td>
+            </tr>
+            <tr>
+                <td style = "text-align: right;">
+                    <label for="newBorn">NewBorn</label>
+                </td>
+                <td style = "text-align: left;">
+                    <select id="newBorn" name="place" th:field="*{newBorn}">
                         <option th:value="${''}" th:text="${''}"></option>
-                        <option th:each="person :   ${people}"
+                        <option th:each="person : ${people}"
                                 th:value="${person.id}" th:text="${person.toString()}"></option>
                     </select>
                     <div th:if="${#fields.hasErrors('newBorn')}">
@@ -83,14 +90,11 @@
                             <li th:each="err : ${#fields.errors('newBorn')}" th:text="${err}"/>
                         </ul>
                     </div>
-                </div>
-            </div>
-            <div class="col-xl-2 col-md-4">
-                <label for="id">Database Id<span style="color: rgb(255,0,0);">*</span></label>
-                <input class="form-control" id="id"
-                       th:field="*{id}" type="text" readonly>
-            </div>
-        </div>
+                </td>
+            </tr>
+        </table>
+
+
         <button type="submit" class="btn btn-primary">Commit</button>
         <a class="btn btn-secondary" th:href="@{/birthCertificates}" th:text="${'List all'}">List all</a>
         <a class="btn btn-success" th:href="@{/static}" th:text="${'Home'}">Home</a>