login screen minor improvements
This commit is contained in:
parent
7f0826c774
commit
f5fba13f2b
|
@ -1,48 +1,52 @@
|
||||||
{% extends "login_base.html" %}
|
{% extends "login_base.html" %}
|
||||||
{% load i18n static language_code%}
|
{% load i18n static language_code %}
|
||||||
|
|
||||||
{% block login_content %}
|
{% block login_content %}
|
||||||
|
|
||||||
|
<div class="pt-2 pb-3">
|
||||||
|
<h5 class="card-title text-center pb-0 fs-4 help"> {% trans "Sign in" %}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form action="{% url 'login:login' %}" method="post" class="row g-3 needs-validation" novalidate>
|
<form action="{% url 'login:login' %}" method="post" class="row g-3 needs-validation" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="col-12">
|
<div class="col-12 mb-">
|
||||||
<input type="email" name="username" maxlength="100" autocapitalize="off"
|
<input type="email" name="username" maxlength="100" autocapitalize="off"
|
||||||
autocorrect="off" class="form-control textinput textInput" id="yourEmail" required
|
autocorrect="off" class="form-control textinput textInput {% if form.username.errors %}is-invalid{% endif %}" id="yourEmail" required
|
||||||
autofocus placeholder="{{ form.username.label }}"
|
autofocus placeholder="{{ form.username.label }}"
|
||||||
{% if form.username.value %}value="{{ form.username.value }}" {% endif %}>
|
{% if form.username.value %}value="{{ form.username.value }}" {% endif %}>
|
||||||
<div class="invalid-feedback">{%trans 'Please enter your email.' %}</div>
|
|
||||||
{% if form.username.errors %}
|
{% if form.username.errors %}
|
||||||
<p class="text-error">
|
<div class="invalid-feedback d-block">
|
||||||
{{ form.username.errors|striptags }}
|
{{ form.username.errors|striptags }}
|
||||||
</p>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12 mb-3">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="password" name="password" maxlength="100" autocapitalize="off"
|
<input type="password" name="password" maxlength="100" autocapitalize="off"
|
||||||
autocorrect="off" class="form-control textinput textInput" id="id_password"
|
autocorrect="off" class="form-control textinput textInput {% if form.password.errors %}is-invalid{% endif %}" id="id_password"
|
||||||
placeholder="{{ form.password.label }}" required>
|
placeholder="{{ form.password.label }}" required>
|
||||||
|
<i class="input-group-text bi bi-eye" id="togglePassword" style="cursor: pointer"></i>
|
||||||
|
</div>
|
||||||
{% if form.password.errors %}
|
{% if form.password.errors %}
|
||||||
<p class="text-error">
|
<div class="invalid-feedback d-block">
|
||||||
{{ form.password.errors|striptags }}
|
{{ form.password.errors|striptags }}
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
<i class="input-group-text bi bi-eye" id="togglePassword" style="cursor: pointer">
|
|
||||||
</i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="invalid-feedback">{% trans 'Please enter your password!'%}</div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input name="next" type="hidden" value="{{ success_url }}">
|
<input name="next" type="hidden" value="{{ success_url }}">
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12 mb-3">
|
||||||
<button class="btn btn-primary w-100" type="submit">{% trans "Next"%}</button>
|
<button class="btn btn-primary w-100" type="submit">{% trans "Next" %}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="login-footer" class="mt-3 d-flex justify-content-between align-items-center">
|
|
||||||
<a href="{% url 'login:password_reset' %}" data-toggle="modal" data-target="#forgotPasswordModal">{% trans "Forgot your password? Click here to recover" %}</a>
|
|
||||||
<div class="dropdown ms-auto pl-1">
|
<div id="login-footer" class="d-flex justify-content-between align-items-center mt-4">
|
||||||
|
<a href="{% url 'login:password_reset' %}" data-toggle="modal" data-target="#forgotPasswordModal">{% trans "Forgot your password?" %}</a>
|
||||||
|
<div class="dropdown ms-auto">
|
||||||
<form action="{% url 'set_language' %}" method="post">
|
<form action="{% url 'set_language' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button class="btn btn-tertiary dropdown-toggle" type="button" id="languageDropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
<button class="btn btn-tertiary dropdown-toggle" type="button" id="languageDropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
@ -61,4 +65,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
|
<section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center">
|
<div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center">
|
||||||
|
@ -57,51 +57,37 @@
|
||||||
</a>
|
</a>
|
||||||
</div><!-- End Logo -->
|
</div><!-- End Logo -->
|
||||||
|
|
||||||
<div class="card mb-3 shadow p-3 mb-5 bg-body rounded">
|
<div class="card shadow bg-body rounded">
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="pt-2 pb-3">
|
|
||||||
<h5 class="card-title text-center pb-0 fs-4 help"> {% trans "Sign in" %}</h5>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% block login_content %}
|
{% block login_content %}
|
||||||
|
|
||||||
{% endblock login_content %}
|
{% endblock login_content %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if messages %}
|
||||||
|
<div class="col-12 mt-3">
|
||||||
|
{% for message in messages %}
|
||||||
|
<div class="alert alert-danger show text-center" role="alert">
|
||||||
|
{{message}}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="credits">
|
<div class="credits">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<main class="col-md-12 bt-5">
|
|
||||||
{% block messages %}
|
|
||||||
{% for message in messages %}
|
|
||||||
<div class="alert alert-{{ message.tags|default:'info' }} alert-dismissible fade show" role="alert">
|
|
||||||
{{ message }}
|
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endblock messages %}
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<footer class="footer text-center">
|
<footer class="footer text-center fixed-bottom bg-light py-3">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<span class="text-muted">{{ commit_id }}</span>
|
<span class="text-muted">{{ commit_id }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue