form.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 - images</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 rounded-3 text-center p-4">
  21. <h3>Image Details</h3>
  22. <form th:object="${imageCommand}" th:action="@{/image}" 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="name">Name :&nbsp;</label>
  39. </td>
  40. <td style="text-align: left;">
  41. <input class="form-control" id="name"
  42. th:field="*{name}" type="text">
  43. <div th:if="${#fields.hasErrors('name')}">
  44. <ul class="text-danger">
  45. <li th:each="err : ${#fields.errors('name')}" th:text="${err}"/>
  46. </ul>
  47. </div>
  48. </td>
  49. </tr>
  50. <tr><td>&nbsp;</td></tr>
  51. </table>
  52. <button type="submit" class="btn btn-primary">Commit</button>
  53. <a class="btn btn-secondary" th:href="@{/people}" th:text="${'List all'}">List all</a>
  54. <a class="btn btn-success" th:href="@{/}" th:text="${'Home'}">Home</a>
  55. <h6><span style="color: rgb(255,0,0);">*</span><span> Cannot be edited</span></h6>
  56. </form>
  57. </div>
  58. </body>
  59. </html>