mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 05:18:26 +02:00
Add specific login and logout pages for chat
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
23
tfjm/templates/registration/includes/login.html
Normal file
23
tfjm/templates/registration/includes/login.html
Normal file
@ -0,0 +1,23 @@
|
||||
{% load i18n crispy_forms_filters %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<p class="errornote">
|
||||
{% blocktrans trimmed %}
|
||||
You are authenticated as {{ user }}, but are not authorized to
|
||||
access this page. Would you like to login to a different account?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<form method="post" id="login-form">
|
||||
<div id="form-content">
|
||||
{{ form|as_crispy_errors }}
|
||||
{% csrf_token %}
|
||||
{{ form.username|as_crispy_field }}
|
||||
<div class="form-text mb-3">
|
||||
<i class="fas fa-info-circle"></i> {% trans "Your username is your e-mail address." %}
|
||||
</div>
|
||||
{{ form.password|as_crispy_field }}
|
||||
<a href="{% url 'password_reset' %}" class="badge text-bg-warning">{% trans 'Forgotten your password?' %}</a>
|
||||
</div>
|
||||
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary">
|
||||
</form>
|
@ -2,31 +2,11 @@
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n crispy_forms_filters %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Log in" %}{% endblock %}
|
||||
{% block content-title %}<h1>{% trans "Log in" %}</h1>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<p class="errornote">
|
||||
{% blocktrans trimmed %}
|
||||
You are authenticated as {{ user }}, but are not authorized to
|
||||
access this page. Would you like to login to a different account?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<form method="post" id="login-form">
|
||||
<div id="form-content">
|
||||
{{ form|as_crispy_errors }}
|
||||
{% csrf_token %}
|
||||
{{ form.username|as_crispy_field }}
|
||||
<div class="form-text mb-3">
|
||||
<i class="fas fa-info-circle"></i> {% trans "Your username is your e-mail address." %}
|
||||
</div>
|
||||
{{ form.password|as_crispy_field }}
|
||||
<a href="{% url 'password_reset' %}" class="badge text-bg-warning">{% trans 'Forgotten your password?' %}</a>
|
||||
</div>
|
||||
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary">
|
||||
</form>
|
||||
{% include "registration/includes/login.html" %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user