form.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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="personCommand" type="scot.carricksoftware.grants.commands.people.PersonCommand"*/-->
  19. <div th:insert="~{fragments/layout::banner}"></div>
  20. <div class="container border border-info
  21. rounded-3 text-center p-4">
  22. <form th:object="${personCommand}" th:action="@{/person}" method="post">
  23. <div th:if="${#fields.hasErrors('*')}" class="alert alert-danger">
  24. <p>Please Correct The Errors Below</p>
  25. </div>
  26. <div class="form-group row justify-content-center">
  27. <div class="col-xs-3" style="margin-right:20px;">
  28. <label for="firstName">First Name</label>
  29. <input class="form-control" id="firstName"
  30. th:field="*{firstName}" type="text">
  31. <div th:if="${#fields.hasErrors('firstName')}">
  32. <ul class="text-danger">
  33. <li th:each="err : ${#fields.errors('firstName')}" th:text="${err}"/>
  34. </ul>
  35. </div>
  36. </div>
  37. <div class="col-xs-3 " style="margin-right:20px;">
  38. <label for="lastName">Last Name</label>
  39. <input class="form-control" id="lastName"
  40. th:field="*{lastName}" type="text">
  41. <div th:if="${#fields.hasErrors('lastName')}">
  42. <ul class="text-danger">
  43. <li th:each="err : ${#fields.errors('lastName')}" th:text="${err}"/>
  44. </ul>
  45. </div>
  46. </div>
  47. <div class="col-xs-2">
  48. <label for="id">Database Id<span style="color: rgb(255,0,0);">*</span></label>
  49. <input class="form-control" id="id"
  50. th:field="*{id}" type="text" readonly>
  51. </div>
  52. </div>
  53. <div class="form-group row justify-content-center">
  54. <div class="col-xs-3 " style="margin-right:20px;">
  55. <label for="certifiedYearOfBirth">Certified Year of Birth<span style="color: rgb(255,0,0);">*</span></label>
  56. <input class="form-control" id="certifiedYearOfBirth"
  57. th:field="*{certifiedYearOfBirth}" type="text" readonly>
  58. </div>
  59. <div class="col-xs-3 " style="margin-right:20px;">
  60. <label for="recordedYearOfBirth">Recorded Year of Birth<span style="color: rgb(255,0,0);">*</span></label>
  61. <input class="form-control" id="recordedYearOfBirth"
  62. th:field="*{recordedYearOfBirth}" type="text" readonly>
  63. </div>
  64. </div>
  65. <button type="submit" class="btn btn-primary">Commit</button>
  66. <a class="btn btn-secondary" th:href="@{/people}" th:text="${'List all'}">List all</a>
  67. <a class="btn btn-success" th:href="@{/}" th:text="${'Home'}">Home</a>
  68. <h6><span style="color: rgb(255,0,0);">*</span><span> Cannot be edited</span></h6>
  69. </form>
  70. </div>
  71. </body>
  72. </html>