tecnologia-form.jsp 1.76 KB
Newer Older
1 2 3
<%@ 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" %>
4 5
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<layout:extends name="layouts/base.jsp">
6
    <layout:put block="cssDeclaracion" type="APPEND"></layout:put>
7
    <layout:put block="contents" type="REPLACE">
8 9 10
        <div class="card justify-content-center mx-auto mt-2" style="width: 20rem;">
            <div class="card-header">
              <h5>Tecnología</h5>
11
            </div>
12
              <form:form
13
              action="/tecnologias/${tecnologia.id == null ? 'agregar' : 'modificar/'.concat(tecnologia.id)}"
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
              method="post"
              modelAttribute="tecnologia"
              class="d-flex flex-column"
              >
                <div class="card-body">
                    <form:label class="form-label visually-hidden" path="nombre"
                    >Nombre
                    </form:label>
                    <form:input type="text" path="nombre" class="form-control ${ mismoNombre ? 'is-invalid' : ''}" required="true" placeholder="Nombre de la tecnologia"/>
                    <div id="validationServerUsernameFeedback" class="invalid-feedback">
                      Este nombre ya existe
                    </div>
                </div>
                <div class="card-footer d-flex flex-column">
                  <div class="mt-2 align-self-end">
                      <input type="submit" value='${tecnologia.id == null ? "Agregar" : "Modificar"}' class="btn btn-primary" />
                  </div>
                </div>
              </form:form>
          </div>
        
        
36 37
    </layout:put>
</layout:extends>