<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/head :: head}">
    <meta charset="UTF-8">
    <title>Too Easy</title>
</head>
<body>
<div th:replace="~{layout}">
    <div th:fragment="content">
        <section>
            <div class="container p-4 shadow bg-white rounded">
                <h1 class="mb-4" th:text="${titlePage}"></h1>
                <form th:object="${cprContract}">
                    <div class="mb-3">
                        <input hidden="true" th:field="*{id}">

                        <label class="form-label" for="codigoContratoOperacaoCredito">Código Contrato da Operação de Crédito</label>
                        <input class="form-control" id="codigoContratoOperacaoCredito" th:field="*{codigoContratoOperacaoCredito}" required>

                        <label class="form-label" for="naturezaOperacao">Natureza de Operação</label>
                        <input class="form-control" id="naturezaOperacao" th:field="*{naturezaOperacao}" required>

                        <label class="form-label" for="dataTransacao">Data da Transação</label>
                        <input class="form-control" id="dataTransacao" th:field="*{dataTransacao}" type="date" required>

                        <label class="form-label" for="valorLiquidoCredito">Valor Liquido do Crédito</label>
                        <div class="input-group">
                            <span class="input-group-text">R$</span>
                            <input class="form-control autodecimal" id="valorLiquidoCredito" th:field="*{valorLiquidoCredito}" placeholder="0,00"
                                   required>
                        </div>

                        <label class="form-label" for="valorTotalCredito">Valor Total do Crédito</label>
                        <div class="input-group">
                            <span class="input-group-text">R$</span>
                            <input class="form-control autodecimal" id="valorTotalCredito" th:field="*{valorTotalCredito}" placeholder="0,00"
                                   required>
                        </div>
                    </div>

                    <button class="btn btn-dark" formmethod="post" th:formaction="@{/cpr/contract}" type="submit">Salvar</button>
                </form>
            </div>
        </section>
    </div>
</div>
</body>
</html>