<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<layout:extends name="layouts/base.jsp">
    <layout:put block="cssDeclaracion" type="APPEND"></layout:put>
    <layout:put block="contents" type="REPLACE">
        <div class="card justify-content-center mx-auto mt-2" style="width: 20rem;">
            <div class="card-header">
              <h5>Feriados</h5>
            </div>
              <form:form
              action="/feriados/${feriado.id == null ? 'agregar' : 'modificar/'.concat(feriado.id)}"
              method="post"
              modelAttribute="feriado"
              class="d-flex flex-column"
              enctype="multipart/form-data"
              >
                <div class="card-body">
                    <label class="form-label visually-hidden" path="motivoFeriado"
                    >Motivo del Feriado
                    </label>
                    <input type="text" name="motivoFeriado" path="motivoFeriado" class="form-control ${ mismoMotivo ? 'is-invalid' : ''}" required="true" placeholder="Motivo del Feriado"/>
                    <div id="validationServerUsernameFeedback" class="invalid-feedback">
                      Este Feriado ya existe
                    </div>
                    <label class="form-label visually-hidden" path="fecha"
                    >Descripción
                    </label>
                    <input type="date" name="fecha" class="form-control" required="true" placeholder="Fecha de Feriado"/>
                </div>
                <div class="card-footer d-flex flex-column">
                  <div class="mt-2 align-self-end">
                      <input type="submit" value='${feriado.id == null ? "Agregar" : "Modificar"}' class="btn btn-primary" />
                  </div>
                </div>
              </form:form>
          </div>
        
        
    </layout:put>
</layout:extends>