mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-08 11:59:13 +00:00
añadido perfil a IL
This commit is contained in:
107
src/main/resources/templates/imprimelibros/users/profile.html
Normal file
107
src/main/resources/templates/imprimelibros/users/profile.html
Normal file
@ -0,0 +1,107 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{imprimelibros/layout}">
|
||||
|
||||
<head>
|
||||
<th:block layout:fragment="pagetitle" />
|
||||
<th:block th:replace="~{imprimelibros/partials/head-css :: head-css}" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div th:replace="~{imprimelibros/partials/topbar :: topbar}" />
|
||||
<div th:replace="~{imprimelibros/partials/sidebar :: sidebar}" />
|
||||
|
||||
<th:block layout:fragment="content">
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/"><i class="ri-home-5-fill"></i></a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:text="#{app.perfil}">Perfil</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0" th:text="#{usuarios.profile.title}">Editar perfil</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div th:if="${success}" class="alert alert-success"
|
||||
th:text="#{usuarios.profile.success}">Perfil actualizado.</div>
|
||||
|
||||
<form id="profileForm" novalidate th:action="@{/pages-profile}" th:object="${user}"
|
||||
method="post">
|
||||
|
||||
<div th:if="${#fields.hasGlobalErrors()}" class="alert alert-danger">
|
||||
<div th:each="e : ${#fields.globalErrors()}" th:text="${e}"></div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label th:text="#{usuarios.form.nombre}" for="fullName">Nombre</label>
|
||||
<input type="text" class="form-control" id="fullName" th:field="*{fullName}"
|
||||
th:classappend="${#fields.hasErrors('fullName')} ? ' is-invalid'" required>
|
||||
<div class="invalid-feedback" th:if="${#fields.hasErrors('fullName')}"
|
||||
th:errors="*{fullName}">Error</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label th:text="#{usuarios.form.email}" for="userName">Correo electrónico</label>
|
||||
<input type="email" class="form-control" id="userName" th:field="*{userName}"
|
||||
th:classappend="${#fields.hasErrors('userName')} ? ' is-invalid'" required>
|
||||
<div class="invalid-feedback" th:if="${#fields.hasErrors('userName')}"
|
||||
th:errors="*{userName}">Error</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<label th:text="#{usuarios.form.password.actual}" for="currentPassword">Contraseña actual</label>
|
||||
<input type="password" class="form-control" id="currentPassword"
|
||||
th:field="*{currentPassword}"
|
||||
th:classappend="${#fields.hasErrors('currentPassword')} ? ' is-invalid'">
|
||||
<div class="invalid-feedback" th:if="${#fields.hasErrors('currentPassword')}"
|
||||
th:errors="*{currentPassword}">Error</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label th:text="#{usuarios.form.password.nueva}" for="newPassword">Nueva contraseña</label>
|
||||
<input type="password" class="form-control" id="newPassword"
|
||||
th:field="*{newPassword}"
|
||||
th:classappend="${#fields.hasErrors('newPassword')} ? ' is-invalid'">
|
||||
<div class="text-muted" th:text="#{usuarios.form.password.nota}">
|
||||
Solo podrás cambiar la contraseña si indicas la actual.
|
||||
</div>
|
||||
<div class="invalid-feedback" th:if="${#fields.hasErrors('newPassword')}"
|
||||
th:errors="*{newPassword}">Error</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label th:text="#{usuarios.form.confirmarPassword}" for="confirmPassword">Confirmar contraseña</label>
|
||||
<input type="password" class="form-control" id="confirmPassword"
|
||||
th:field="*{confirmPassword}"
|
||||
th:classappend="${#fields.hasErrors('confirmPassword')} ? ' is-invalid'">
|
||||
<div class="invalid-feedback" th:if="${#fields.hasErrors('confirmPassword')}"
|
||||
th:errors="*{confirmPassword}">Error</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-secondary" th:text="#{app.guardar}">Guardar</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
<th:block layout:fragment="modal" />
|
||||
<th:block th:replace="~{theme/partials/vendor-scripts :: scripts}" />
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user