form.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <!DOCTYPE html>
  2. <!--suppress XmlHighlighting -->
  3. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  4. <head>
  5. <!-- Required meta tags -->
  6. <meta charset="utf-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  8. <!-- Bootstrap CSS -->
  9. <!--suppress SpellCheckingInspection -->
  10. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
  11. integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  12. <!--suppress SpellCheckingInspection -->
  13. <script src="https://code.jquery.com/jquery-3.6.0.min.js"
  14. integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
  15. <title>Grants - person</title>
  16. </head>
  17. <body>
  18. <!--/*@thymesVar id="deathCertificateCommand" type="scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand"*/-->
  19. <div th:insert="~{fragments/layout::banner}"></div>
  20. <div class="container border border-info rounded-3 text-center p-4">
  21. <h3>Death Certificate Details</h3>
  22. <form th:object="${deathCertificateCommand}" th:action="@{/deathCertificate}" method="post">
  23. <div th:if="${#fields.hasErrors('*')}" class="alert alert-danger">
  24. <p>Please Correct The Errors Below</p>
  25. </div>
  26. <table style="width:100%;">
  27. <tr>
  28. <td style="text-align: right;">
  29. <label for="id"><span style="color: rgb(255,0,0);">*</span>Database Id :&nbsp;</label>
  30. </td>
  31. <td style="text-align: left;">
  32. <input class="form-control" id="id"
  33. th:field="*{id}" type="text" readonly>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td style="text-align: right;">
  38. <label for="certificateNumber">Certificate Number :&nbsp;</label>
  39. </td>
  40. <td style="text-align: left;">
  41. <input class="form-control" id="certificateNumber"
  42. th:field="*{certificateNumber}" type="text">
  43. <div th:if="${#fields.hasErrors('certificateNumber')}">
  44. <ul class="text-danger">
  45. <li th:each="err : ${#fields.errors('certificateNumber')}" th:text="${err}"/>
  46. </ul>
  47. </div>
  48. </td>
  49. </tr> <tr>
  50. <td style="text-align: right;">
  51. <label for="certificateSource">Certificate Source&nbsp;:&nbsp;</label>
  52. </td>
  53. <td style="text-align: left;">
  54. <div>
  55. <select id="certificateSource" name="certificateSource" th:field="*{certificateSource}">
  56. <option th:value="${''}" th:text="${''}"></option>
  57. <!--/*@thymesVar id="organisations" type="scot.carricksoftware.grants.domains.places.Organisation"*/-->
  58. <option th:each="organisation : ${organisations}"
  59. th:value="${organisation.id}" th:text="${organisation.toString()}"></option>
  60. </select>
  61. <div th:if="${#fields.hasErrors('certificateSource')}">
  62. <ul class="text-danger">
  63. <li th:each="err : ${#fields.errors('certificateSource')}" th:text="${err}"/>
  64. </ul>
  65. </div>
  66. </div>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td style="text-align: right;">
  71. <label for="certificateDate">Certificate Date (dd/mm/yyyy) :&nbsp;</label>
  72. </td>
  73. <td style="text-align: left;">
  74. <input class="form-control" id="certificateDate"
  75. th:field="*{certificateDate}" type="text">
  76. <div th:if="${#fields.hasErrors('certificateDate')}">
  77. <ul class="text-danger">
  78. <li th:each="err : ${#fields.errors('certificateDate')}" th:text="${err}"/>
  79. </ul>
  80. </div>
  81. </td>
  82. </tr>
  83. <tr style="border-bottom: 5px solid #ccc;">
  84. <td style="text-align: right;">
  85. <label for="certificateType">Certificate Type :&nbsp;</label>
  86. </td>
  87. <td style="text-align: left;">
  88. <div>
  89. <select id="certificateType" style="width: 200px;" name="certificateType"
  90. th:field="*{certificateType}">
  91. <option th:value="${''}" th:text="${''}"></option>
  92. <option th:each="value : ${T(scot.carricksoftware.grants.enums.certificates.CertificateType).values()}"
  93. th:value="${value}" th:text="${value.label}"></option>
  94. </select>
  95. </div>
  96. <div th:if="${#fields.hasErrors('certificateType')}">
  97. <ul class="text-danger">
  98. <li th:each="err : ${#fields.errors('certificateType')}" th:text="${err}"/>
  99. </ul>
  100. </div>
  101. </tr>
  102. <tr>
  103. <td style="text-align: right;">
  104. <label for="registrationAuthority">Registration Authority :&nbsp;</label>
  105. </td>
  106. <td style="text-align: left;">
  107. <div>
  108. <select id="registrationAuthority" style="width: 200px;" name="registrationAuthority"
  109. th:field="*{registrationAuthority}">
  110. <option th:value="${''}" th:text="${''}"></option>
  111. <!--/*@thymesVar id="organisations" type="scot.carricksoftware.grants.domains.places.Organisation"*/-->
  112. <option th:each="organisation : ${organisations}"
  113. th:value="${organisation.id}" th:text="${organisation.name}"></option>
  114. </select>
  115. </div>
  116. <div th:if="${#fields.hasErrors('registrationAuthority')}">
  117. <ul class="text-danger">
  118. <li th:each="err : ${#fields.errors('registrationAuthority')}" th:text="${err}"/>
  119. </ul>
  120. </div>
  121. </td>
  122. </tr>
  123. <tr>
  124. <td style="text-align: right;">
  125. <label for="volume">Volume :&nbsp;</label>
  126. </td>
  127. <td style="text-align: left;">
  128. <div>
  129. <input class="volume" id="volume"
  130. th:field="*{volume}" type="text">
  131. <div th:if="${#fields.hasErrors('volume')}">
  132. <ul class="text-danger">
  133. <li th:each="err : ${#fields.errors('volume')}" th:text="${err}"/>
  134. </ul>
  135. </div>
  136. </div>
  137. </td>
  138. </tr>
  139. <tr style="border-bottom: 5px solid #ccc;">
  140. <td style="text-align: right;">
  141. <label for="number">Number :&nbsp;</label>
  142. </td>
  143. <td style="text-align: left;">
  144. <div>
  145. <input class="number" id="number"
  146. th:field="*{number}" type="text">
  147. <div th:if="${#fields.hasErrors('number')}">
  148. <ul class="text-danger">
  149. <li th:each="err : ${#fields.errors('number')}" th:text="${err}"/>
  150. </ul>
  151. </div>
  152. </div>
  153. </td>
  154. </tr>
  155. </table>
  156. <button type="submit" class="btn btn-primary">Commit</button>
  157. <a class="btn btn-secondary" th:href="@{/deathCertificates}" th:text="${'List all'}">List all</a>
  158. <a class="btn btn-success" th:href="@{/static}" th:text="${'Home'}">Home</a>
  159. <h6><span style="color: rgb(255,0,0);">*</span><span> Cannot be edited</span></h6>
  160. </form>
  161. </div>
  162. </body>
  163. </html>