2022-01-23 23:01:47 -05:00
|
|
|
{% extends "base.dj.html" %}
|
2020-12-14 13:26:47 -05:00
|
|
|
|
2020-12-15 14:16:10 -05:00
|
|
|
{% load widget_tweaks %}
|
|
|
|
|
2022-01-23 23:03:08 -05:00
|
|
|
{% block title %}Login{% endblock %}
|
2020-12-14 13:26:47 -05:00
|
|
|
{% block content %}
|
|
|
|
{% if form.errors %}
|
2022-01-23 23:03:08 -05:00
|
|
|
<p class="alert alert-danger">
|
|
|
|
Your username and password didn't match. Please try again.
|
|
|
|
</p>
|
2020-12-14 13:26:47 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if next %}
|
|
|
|
{% if user.is_authenticated %}
|
2020-12-15 14:16:10 -05:00
|
|
|
<p class="alert alert-danger">
|
|
|
|
Your account doesn't have access to this page. To proceed,
|
|
|
|
please login with an account that has access.
|
|
|
|
</p>
|
2020-12-14 13:26:47 -05:00
|
|
|
{% else %}
|
2022-01-23 23:03:08 -05:00
|
|
|
<p class="alert alert-info">
|
|
|
|
Please login to see this page.
|
|
|
|
</p>
|
2020-12-14 13:26:47 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2022-01-23 23:03:08 -05:00
|
|
|
<form class="d-flex flex-column align-items-center"
|
|
|
|
method="post"
|
|
|
|
action="{% url 'login' %}">
|
2020-12-14 13:26:47 -05:00
|
|
|
{% csrf_token %}
|
2020-12-15 14:16:10 -05:00
|
|
|
{% for field in form %}
|
2022-01-23 23:03:08 -05:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-sm-4 col-form-label" for="{{ field.auto_id }}">{{ field.label }}</label>
|
|
|
|
<div class="col-sm-8">{% render_field field class="form-control" %}</div>
|
2020-12-15 14:16:10 -05:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
<input type="submit" class="btn btn-primary" value="login" />
|
2020-12-14 13:26:47 -05:00
|
|
|
<input type="hidden" name="next" value="{{ next }}" />
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|