<!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="${cprEmission}">
                    <div class="mb-3">
                        <input hidden="true" th:field="*{id}">

                        <label class="form-label" for="razaoSocialEmissor">Razão Social do Emissor</label>
                        <input class="form-control" id="razaoSocialEmissor" th:field="*{razaoSocialEmissor}" required>

                        <label class="form-label" for="localEmissao">Local de Emissão</label>
                        <input class="form-control" id="localEmissao" th:field="*{localEmissao}" required>

                        <label class="form-label" for="dataEntrega">Data da Entrega</label>
                        <input class="form-control" id="dataEntrega" th:field="*{dataEntrega}" type="date" required>

                        <label class="form-label" for="tipoCpr">Tipo</label>
                        <select class="form-select" id="tipoCpr" th:field="*{tipoCpr}" required>
                            <option value="" selected="selected">Selecione...</option>
                            <option value="FISICO">Físico</option>
                            <option value="FINANCEIRO">Financeiro</option>
                        </select>
                    </div>

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