1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +00:00
AdvLabDB/advlabdb/templates/security/login_user.html
2022-11-10 13:20:40 +01:00

88 lines
2.9 KiB
HTML

{% extends "security/base.html" %}
{% from "security/_macros.html" import render_field, render_field_errors, render_form_errors %}
{% block title %}AdvLabDB - Login{% endblock %}
{% block body_attribs %}
style="
background-image: radial-gradient(#35393b, #181a1b);
"
{% endblock %}
{% block body %}
<style>
.fs-error-msg {
color: #ff6b6b;
}
</style>
<font color="white">
<div style="display: flex;
justify-content: center;
align-items: center;
height: 95vh">
<div style=" text-align: center; ">
<h1>AdvLabDB</h1>
<p>Database for labs</p>
<h2>Login</h2>
{% if message %}
<div style="background-color: rgba(255,200,0,0.2); padding: 10px;">{{ message | safe }}</div>
{% endif %}
{% include "security/_messages.html" %}
<br>
<form action="{{ url_for_security('login') }}"
method="POST"
name="login_user_form">
{{ login_user_form.hidden_tag() }}
{{ render_form_errors(login_user_form) }}
<div style=" display: flex; justify-content: center; ">
<table>
<tr>
<td>Email</td>
<td>{{ login_user_form.email() }}</td>
</tr>
<tr>
<td>Password</td>
<td>{{ login_user_form.password() }}</td>
</tr>
</table>
</div>
{% if login_user_form.email.errors %}
<ul>
{% for error in login_user_form.email.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
</ul>
{% endif %}
{% if login_user_form.password.errors %}
<ul>
{% for error in login_user_form.password.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
</ul>
{% endif %}
<br>
Remember me {{ login_user_form.remember() }}
{% if login_user_form.remember.errors %}
<ul>
{% for error in login_user_form.remember.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
</ul>
{% endif %}
{{ render_field_errors(login_user_form.csrf_token) }}
<br>
{{ render_field(login_user_form.submit) }}
</form>
</div>
</div>
</font>
{% endblock %}