mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-10 00:03:24 +00:00
63 lines
1.9 KiB
Django/Jinja
63 lines
1.9 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
|
|
{%- block additional_css -%}
|
|
<link rel="stylesheet" href="{{ scss('user/login.scss') }}">
|
|
{%- endblock -%}
|
|
|
|
{% block title %}
|
|
{% trans %}Login{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block info_boxes %}
|
|
{% endblock %}
|
|
|
|
{% block nav %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1 class="title">{% trans %}Login{% endtrans %}</h1>
|
|
|
|
{% if next %}
|
|
{% if user.is_authenticated %}
|
|
<p>{% trans %}Your account doesn't have access to this page. To proceed,
|
|
please login with an account that has access.{% endtrans %}</p>
|
|
{% else %}
|
|
<p>{% trans %}Please login or create an account to see this page.{% endtrans %}</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<form method="post" action="{{ url('core:login') }}">
|
|
{% if form.errors %}
|
|
<p class="alert alert-red">{% trans %}Your username and password didn't match. Please try again.{% endtrans %}</p>
|
|
<br>
|
|
{% endif %}
|
|
|
|
{% csrf_token %}
|
|
{% render_honeypot_field %}
|
|
|
|
<div>
|
|
<label for="{{ form.username.name }}">{{ form.username.label }}</label>
|
|
<input id="id_username" maxlength="254" name="username" type="text" autofocus="autofocus" />
|
|
{{ form.username.errors }}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="{{ form.password.name }}">{{ form.password.label }}</label>
|
|
{{ form.password }}
|
|
{{ form.password.errors }}
|
|
</div>
|
|
|
|
<input type="hidden" name="next" value="{{ next }}">
|
|
<input type="submit" value="{% trans %}Login{% endtrans %}">
|
|
|
|
|
|
{# Assumes you setup the password_reset view in your URLconf #}
|
|
<p>
|
|
<a href="{{ url('core:password_reset') }}">{% trans %}Lost password?{% endtrans %}</a>
|
|
|
|
<a href="{{ url('core:register') }}">{% trans %}Create account{% endtrans %}</a>
|
|
</p>
|
|
</form>
|
|
{% endblock %}
|
|
|