40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Login</title>
|
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
|
</head>
|
|
<body>
|
|
<div class="container1">
|
|
<h2>Iniciar Sesión</h2>
|
|
|
|
<form id="loginForm" th:action="@{/login}" method="post">
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
|
|
|
<div class="input-group">
|
|
<label for="username">Usuario:</label>
|
|
<input type="text" id="username" name="username" required>
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label for="password">Contraseña:</label>
|
|
<input type="password" id="password" name="password" autocomplete="off" required>
|
|
</div>
|
|
|
|
<button type="submit">Ingresar</button>
|
|
</form>
|
|
</div>
|
|
<br>
|
|
<br>
|
|
<!-- Mensaje de error si el login falla -->
|
|
<div th:if="${param.error}" class="error-message">
|
|
<p style="color: red;">Usuario o contraseña incorrectos.</p>
|
|
</div>
|
|
<!-- Mensaje de éxito tras logout -->
|
|
<div th:if="${param.logout}">
|
|
<p style="color: green;">Has cerrado sesión con éxito.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|