birthday-form.jsp 2.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<%@ 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>Cumpleaño</h5>
            </div>
              <form:form
              action="/cumples/${cumple.id == null ? 'agregar' : 'modificar/'.concat(cumple.id)}"
              method="post"
              modelAttribute="cumple"
              class="d-flex flex-column"
17
              enctype="multipart/form-data"
18 19
              >
                <div class="card-body">
20
                    <label class="form-label visually-hidden" path="nombreCompleto"
21
                    >Nombre Completo
22 23
                    </label>
                    <input type="text" name="nombreCompleto" path="nombreCompleto" class="form-control ${ mismoNombre ? 'is-invalid' : ''}" required="true" placeholder="Nombre completo"/>
24 25 26
                    <div id="validationServerUsernameFeedback" class="invalid-feedback">
                      Este nombre completo ya existe
                    </div>
27 28 29 30 31 32
                    <label class="form-label visually-hidden" path="idSlack"
                    >ID Slack
                    </label>
                    <input type="text" name="idSlack" path="idSlack" class="form-control" required="true" placeholder="ID Slack"/>

                    <label class="form-label visually-hidden" path="fecha"
33
                    >Descripción
34 35 36 37 38 39
                    </label>
                    <input type="date" name="fecha" class="form-control" required="true" placeholder="Fecha cumple"/>
                    <label class="form-label visually-hidden" path="foto"
                    >Foto
                    </label>
                    <input type="file" name="file" path="file" class="form-control" required="true"/>
40 41 42 43 44 45 46 47 48 49 50 51 52

                </div>
                <div class="card-footer d-flex flex-column">
                  <div class="mt-2 align-self-end">
                      <input type="submit" value='${cumple.id == null ? "Agregar" : "Modificar"}' class="btn btn-primary" />
                  </div>
                </div>
              </form:form>
          </div>
        
        
    </layout:put>
</layout:extends>