|
| 1 | +{% extends "admin/base_site.html" %} |
| 2 | +{% load i18n static %} |
| 3 | + |
| 4 | +{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/login.css" %}"> |
| 5 | +{{ form.media }} |
| 6 | +{% endblock %} |
| 7 | + |
| 8 | +{% block bodyclass %}{{ block.super }} login{% endblock %} |
| 9 | + |
| 10 | +{% block usertools %}{% endblock %} |
| 11 | + |
| 12 | +{% block nav-global %}{% endblock %} |
| 13 | + |
| 14 | +{% block nav-sidebar %}{% endblock %} |
| 15 | + |
| 16 | +{% block content_title %}{% endblock %} |
| 17 | + |
| 18 | +{% block nav-breadcrumbs %}{% endblock %} |
| 19 | + |
| 20 | +{% block content %} |
| 21 | + |
| 22 | +{% if form.errors %} |
| 23 | + {% if form.errors.captcha %} |
| 24 | + {{ form.errors.captcha }} |
| 25 | + {% else %} |
| 26 | + {% for error in form.errors.values %} |
| 27 | + {{ error }} |
| 28 | + {% endfor %} |
| 29 | + {% endif %} |
| 30 | +{% endif %} |
| 31 | + |
| 32 | + |
| 33 | +<div id="content-main"> |
| 34 | + |
| 35 | + {% if user.is_authenticated %} |
| 36 | + <p class="errornote"> |
| 37 | + {% blocktranslate trimmed %} |
| 38 | + You are authenticated as {{ username }}, but are not authorized to |
| 39 | + access this page. Would you like to login to a different account? |
| 40 | + {% endblocktranslate %} |
| 41 | + </p> |
| 42 | + {% endif %} |
| 43 | + |
| 44 | + <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %} |
| 45 | + <div class="form-row"> |
| 46 | + {{ form.username.errors }} |
| 47 | + {{ form.username.label_tag }} {{ form.username }} |
| 48 | + </div> |
| 49 | + <div class="form-row"> |
| 50 | + {{ form.password.errors }} |
| 51 | + {{ form.password.label_tag }} {{ form.password }} |
| 52 | + <input type="hidden" name="next" value="{{ next }}"> |
| 53 | + </div> |
| 54 | + {% url 'admin_password_reset' as password_reset_url %} |
| 55 | + {% if password_reset_url %} |
| 56 | + <div class="password-reset-link"> |
| 57 | + <a href="{{ password_reset_url }}">{% translate 'Forgotten your password or username?' %}</a> |
| 58 | + </div> |
| 59 | + {% endif %} |
| 60 | + <div class="field" style="padding-top: 1rem; text-align: center;"> |
| 61 | + <div class="control" style="display: inline-block;"> |
| 62 | + {{ form.captcha }} |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + <div class="submit-row"> |
| 66 | + <input type="submit" value="{% translate 'Log in' %}"> |
| 67 | + </div> |
| 68 | + </form> |
| 69 | +</div> |
| 70 | +{% endblock %} |
0 commit comments