Files
erp-imprimelibros/src/main/resources/templates/imprimelibros/configuracion/margenes-presupuesto/margenes-presupuesto-form.html

43 lines
2.7 KiB
HTML

<div th:fragment="margenesPresupuestoForm">
<form id="margenesPresupuestoForm" novalidate th:action="${action}" th:object="${margenPresupuesto}" method="post" th:data-add="#{margenesPresupuesto.add}"
th:data-edit="#{margenesPresupuesto.editar}">
<input type="hidden" name="_method" value="PUT" th:if="${margenPresupuesto.id != null}" />
<div th:if="${#fields.hasGlobalErrors()}" class="alert alert-danger">
<div th:each="e : ${#fields.globalErrors()}" th:text="${e}"></div>
</div>
<div class="form-group">
<label th:text="#{margenes-presupuesto.form.importe_minimo}" for="importe_minimo">Importe Mínimo</label>
<input type="number" class="form-control" id="importe_minimo" th:field="*{importeMin}" min="1"
th:classappend="${#fields.hasErrors('importeMin')} ? ' is-invalid'" required>
<div class="invalid-feedback" th:if="${#fields.hasErrors('importeMin')}" th:errors="*{importeMin}">Error</div>
</div>
<div class="form-group">
<label th:text="#{margenes-presupuesto.form.importe_maximo}" for="importe_maximo">Importe Máximo</label>
<input type="number" class="form-control" id="importe_maximo" th:field="*{importeMax}" min="1"
th:classappend="${#fields.hasErrors('importeMax')} ? ' is-invalid'" required>
<div class="invalid-feedback" th:if="${#fields.hasErrors('importeMax')}" th:errors="*{importeMax}">Error</div>
</div>
<div class="form-group">
<label th:text="#{margenes-presupuesto.form.margen_maximo}" for="margen_maximo">Margen Máximo (%)</label>
<input type="number" class="form-control" id="margen_maximo" th:field="*{margenMax}" min="0" max="100" step="0.01"
th:classappend="${#fields.hasErrors('margenMax')} ? ' is-invalid'" required>
<div class="invalid-feedback" th:if="${#fields.hasErrors('margenMax')}" th:errors="*{margenMax}">Error</div>
</div>
<div class="form-group">
<label th:text="#{margenes-presupuesto.form.margen_minimo}" for="margen_minimo">Margen Mínimo (%)</label>
<input type="number" class="form-control" id="margen_minimo" th:field="*{margenMin}" min="0" max="100" step="0.01"
th:classappend="${#fields.hasErrors('margenMin')} ? ' is-invalid'" required>
<div class="invalid-feedback" th:if="${#fields.hasErrors('margenMin')}" th:errors="*{margenMin}">Error</div>
</div>
<div class="row mt-3 justified-content-center d-flex">
<button type="submit" class="btn btn-secondary" th:text="#{usuarios.guardar}">Guardar</button>
</div>
</form>
</div>