camino-de-oracion/src/main/resources/templates/difuntos/nuevo.html

79 lines
3.8 KiB
HTML

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/head :: head('Añadir Difunto')}"></head>
<body class="d-flex flex-column min-vh-100 bg-light">
<nav th:replace="~{fragments/navbar :: navbar}"></nav>
<main class="flex-grow-1 py-4">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="card border-0 shadow-sm">
<div class="card-header bg-white">
<h5 class="mb-0">
<i class="bi bi-flower1 text-oratio"></i> Añadir difunto
</h5>
</div>
<div class="card-body p-4">
<form th:action="@{/difuntos/nuevo}" th:object="${difunto}" method="post">
<div class="mb-3">
<label for="nombre" class="form-label fw-semibold">Nombre</label>
<input type="text" id="nombre" th:field="*{nombre}"
class="form-control"
th:classappend="${#fields.hasErrors('nombre')} ? 'is-invalid'"
required placeholder="Nombre completo"/>
<div class="invalid-feedback" th:errors="*{nombre}"></div>
</div>
<div class="mb-3">
<label for="relacion" class="form-label fw-semibold">
Relación <span class="text-muted fw-normal">(opcional)</span>
</label>
<input type="text" id="relacion" th:field="*{relacion}"
class="form-control"
placeholder="Ej: Padre, Abuela, Amigo..."/>
</div>
<div class="mb-3">
<label for="fechaFallecimiento" class="form-label fw-semibold">
Fecha de fallecimiento <span class="text-muted fw-normal">(opcional)</span>
</label>
<input type="date" id="fechaFallecimiento"
th:field="*{fechaFallecimiento}" class="form-control"/>
</div>
<div class="mb-4">
<label for="notas" class="form-label fw-semibold">
Notas <span class="text-muted fw-normal">(opcional)</span>
</label>
<textarea id="notas" th:field="*{notas}"
class="form-control" rows="3"
placeholder="Recuerdos, intenciones..."></textarea>
</div>
<div class="d-flex gap-2">
<button type="submit" class="btn btn-oratio">
<i class="bi bi-save"></i> Guardar
</button>
<a th:href="@{/difuntos}" class="btn btn-outline-secondary">
Cancelar
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
<footer class="bg-dark text-white-50 text-center py-3 mt-auto">
<small>Oratio &mdash; Ora et Labora</small>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>