Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
- <a class="navbar-brand" href="#">Spring Boot</a>
- <button class="navbar-toggler" type="button" data-toggle="collapse"
- data-target="#navbarNav" aria-controls="navbarNav"
- aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarNav">
- <ul class="navbar-nav">
- <li class="nav-item active"><a class="nav-link" href="#">Home</a></li>
- <li class="nav-item"><a class="nav-link" th:href="@{/listar}">Clientes</a></li>
- </ul>
- </div>
- </nav>
- <div class="container">
- <h1 th:text="${titulo}"
- class="text-secondary border border-success border-top-0 border-left-0 border-right-0"></h1>
- <div th:object="${cliente}" th:remove="tag">
- <ul th:if="${#fields.hasErrors('*')}" class="alert alert-danger">
- <li th:each="err: ${#fields.errors('*')}" th:text="${err}"></li>
- </ul>
- </div>
- <form th:action="@{/form}" th:object="${cliente}" method="post">
- <div class="form-group row">
- <label class="col-sm-2 col-form-label">Nombre</label>
- <div class="col-sm-6">
- <input type="text" th:field="*{nombre}" class="form-control"
- th:errorclass="'form-control alert-danger'" /> <small
- class="form-text text-danger"
- th:if="${#fields.hasErrors('nombre')}" th:errors="*{nombre}"></small>
- </div>
- </div>
- <div class="form-group row">
- <label class="col-sm-2 col-form-label">Apellido</label>
- <div class="col-sm-6">
- <input type="text" th:field="*{apellido}" class="form-control"
- th:errorclass="'form-control alert-danger'" /> <small
- class="form-text text-danger"
- th:if="${#fields.hasErrors('apellido')}" th:errors="*{apellido}"></small>
- </div>
- </div>
- <div class="form-group row">
- <label class="col-sm-2 col-form-label">Email</label>
- <div class="col-sm-6">
- <input type="text" th:field="*{email}" class="form-control"
- th:errorclass="'form-control alert-danger'" /> <small
- class="form-text text-danger"
- th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></small>
- </div>
- </div>
- <div class="form-group row">
- <div class="col-sm-6">
- <input type="submit" value="Crear Cliente" class="btn btn-primary" />
- </div>
- </div>
- </form>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement