{% extends "allauth/layouts/entrance.html" %} {% load i18n allauth phoxtail_core_tags phoxtail_design_tags %} {% comment %} Wagtail's login for pages restricted to logged-in users (WAGTAIL_FRONTEND_LOGIN_TEMPLATE), served by Django's LoginView, in the auth pages' frame and elements. The form posts back to its own URL, query string included. {% endcomment %} {% block head_title %} {% trans "Login" %} {% endblock head_title %} {% block content %} {% element h1 %} {% trans "Access required" %} {% endelement %} {% element p %} {% trans "This page is private. Log in to continue." %} {% endelement %} {% if user.is_authenticated %} {% element alert %} {% slot message %} {% trans "Your account cannot view this page. Log in with one that can." %} {% endslot %} {% endelement %} {% endif %} {% element form method="post" %} {% slot body %} {% csrf_token %} {% for error in form.non_field_errors %} {% endfor %} {# Django's login field is a text box; an email keyboard suits it. #} {% field "input" form.username input_type="email" %} {% field "input" form.password %} {# only where allauth's URLs are mounted; this page must not depend on them #} {% url 'account_reset_password' as reset_url %} {% if reset_url %} {% trans "Forgot your password?" %} {% endif %} {% if next %}{% endif %} {% endslot %} {% slot actions %} {% element button type="submit" %} {% trans "Login" %} {% endelement %} {% endslot %} {% endelement %} {% endblock content %}