nk20/note_kfet/templates/registration/login.html

44 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2019-08-11 14:21:59 +00:00
{% extends "base.html" %}
2019-08-10 17:00:16 +00:00
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
{% endcomment %}
2020-08-10 09:31:35 +00:00
{% load i18n crispy_forms_tags static %}
2019-08-11 14:21:59 +00:00
{% block title %}{% trans "Log in" %}{% endblock %}
2020-08-10 09:31:35 +00:00
{% block extracss %}
2020-08-22 21:54:58 +00:00
<link rel="stylesheet" href="{% static "registration/css/login.css" %}">
2020-08-10 09:31:35 +00:00
{% endblock %}
2019-08-11 14:21:59 +00:00
{% block content %}
2020-08-21 15:52:48 +00:00
<div class="card bg-light mx-auto" style="max-width: 30rem;">
<h3 class="card-header text-center">
{% trans "Log in" %}
</h3>
<div class="card-body">
{% if user.is_authenticated %}
<div class="alert alert-warning">
{% blocktrans trimmed with username=request.user.username %}
You are authenticated as {{ username }}, but are not authorized to
access this page. Would you like to login to a different account,
or with a higher permission mask?
{% endblocktrans %}
</div>
{% endif %}
2020-08-01 13:13:29 +00:00
2020-08-21 15:52:48 +00:00
{% if request.resolver_match.view_name == 'admin:login' %}
<div class="alert alert-info">
{% blocktrans trimmed %}
You must be logged with a staff account with the higher mask to access Django Admin.
{% endblocktrans %}
2020-08-10 09:31:35 +00:00
</div>
2020-08-21 15:52:48 +00:00
{% endif %}
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
{{ form | crispy }}
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary btn-block btn-lg">
<a href="{% url 'password_reset' %}"
class="badge badge-light">{% trans 'Forgotten your password or username?' %}</a>
</form>
</div>
</div>
{% endblock %}