form.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/head :: head}">
  4. <meta charset="UTF-8">
  5. <title>Too Easy</title>
  6. </head>
  7. <body>
  8. <div th:replace="~{layout}">
  9. <div th:fragment="content">
  10. <section>
  11. <div class="container p-4 shadow bg-white rounded">
  12. <h1 class="mb-4" th:text="${titulo}"></h1>
  13. <form>
  14. <div class="mb-3">
  15. <input hidden="true" name="id" th:value="${commodity.id}" type="text">
  16. <label class="form-label" for="tipoCommodity">Tipo</label>
  17. <select class="form-select" id="tipoCommodity" th:field="${commodity.tipoCommodity}">
  18. <option value="" selected="selected">Selecione...</option>
  19. <option value="SACA_GRAOS">Grãos em sacas de 60kg</option>
  20. </select>
  21. <label class="form-label" for="descricao">Descricao</label>
  22. <input class="form-control" id="descricao" name="descricao" th:value="${commodity.descricao}" type="text">
  23. <label class="form-label" for="quantidade">Quantidade</label>
  24. <input class="form-control autonumeric" id="quantidade" name="quantidade" th:value="${commodity.quantidade}" type="text">
  25. <label class="form-label" for="preco">Preço</label>
  26. <div class="input-group">
  27. <span class="input-group-text">R$</span>
  28. <input class="form-control autodecimal" id="preco" name="preco" th:value="${commodity.preco}" type="text"
  29. placeholder="0,00">
  30. </div>
  31. <label class="form-label" for="vencimentoPagamento">Vencimento do Pagamento</label>
  32. <input class="form-control" id="vencimentoPagamento" name="vencimentoPagamento" th:value="${commodity.vencimentoPagamento}"
  33. type="date">
  34. <label class="form-label" for="dataLimiteEntrega">Data Limite da Entrega</label>
  35. <input class="form-control" id="dataLimiteEntrega" name="dataLimiteEntrega" th:value="${commodity.dataLimiteEntrega}"
  36. type="date">
  37. <label class="form-label" for="cedulaProdutoRural">CPR</label>
  38. <input class="form-control" id="cedulaProdutoRural" name="dataLimiteEntrega" th:value="${commodity.cedulaProdutoRural}"
  39. type="file">
  40. </div>
  41. <button class="btn btn-dark" formmethod="post" th:formaction="@{/commodity}" type="submit">Salvar
  42. </button>
  43. </form>
  44. </div>
  45. </section>
  46. </div>
  47. </div>
  48. </body>
  49. </html>