trabajando en el registro de usuarios

This commit is contained in:
2025-10-03 13:57:22 +02:00
parent 1e24065fb7
commit 5da73a3679
12 changed files with 296 additions and 2 deletions

View File

@ -53,7 +53,7 @@
<div class="mt-5 text-center">
<p class="mb-0">
<span th:text="#{login.new-account}">¿No tienes una cuenta?</span>
<a th:href="@{/auth-signup-cover}" class="fw-semibold text-primary text-decoration-underline"
<a href="/signup" class="fw-semibold text-primary text-decoration-underline"
th:text="#{login.sign-up}">
Regístrate
</a>

View File

@ -0,0 +1,53 @@
<div th:fragment="_signup">
<div class="p-lg-5 p-4">
<div>
<h5 class="text-primary" th:text="#{login.welcome}">¡Bienvenido!</h5>
<p class="text-muted" th:text="#{login.signup-subtitle}">Regístrate para continuar:</p>
</div>
<div class="mt-4">
<form th:action="@{/signup}" method="post">
<!-- CSRF obligatorio -->
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
<div th:if="${param.error}" class="alert alert-danger"
th:text="#{login.error}">
Credenciales inválidas
</div>
<div class="mb-3">
<label for="username" class="form-label" th:text="#{login.email}">Correo electrónico</label>
<input type="email" class="form-control" id="username" th:placeholder="#{login.email-placeholder}"
name="username">
</div>
<div class="mb-3">
<label class="form-label" for="password-input" th:text="#{login.password}">Contraseña</label>
<div class="position-relative auth-pass-inputgroup mb-3">
<input type="password" class="form-control pe-5 password-input"
th:placeholder="#{login.password-placeholder}" id="password-input" name="password">
<button
class="btn btn-link position-absolute end-0 top-0 text-decoration-none text-muted password-addon"
type="button" id="password-addon"><i class="ri-eye-fill align-middle"></i></button>
</div>
</div>
<div class="mb-3">
<label class="form-label" for="password-confirm-input" th:text="#{login.confirm-password}">Confirmar contraseña</label>
<div class="position-relative auth-pass-inputgroup mb-3">
<input type="password" class="form-control pe-5 password-input"
th:placeholder="#{login.password-placeholder}" id="password-confirm-input" name="password-confirm">
<button
class="btn btn-link position-absolute end-0 top-0 text-decoration-none text-muted password-addon"
type="button" id="password-addon"><i class="ri-eye-fill align-middle"></i></button>
</div>
</div>
<div class="mt-4">
<button class="btn btn-secondary w-100" type="submit" th:text="#{login.sign-up-button}">Crear cuenta</button>
</div>
</form>
</div>
</div>
</div>