{% extends "base.html" %}
{% load wagtailcore_tags %}
{% wagtail_site as current_site %}
{% block content %}

  <div class="profile-container">
    <div class="title profile">
        <h3>{% trans "Log in" %}</h3>
    </div>
    <div class="block turq">
      <div class="signin-form">
        <p class="call-to-action__nav-item--challenge-heading">
          <a href={{REGISTRATION_URL}} class="call-to-action__link">
          {% trans "Are you not a member yet" %}?
          </a>
        <p>
      <form method="post" action="" novalidate>
      {% csrf_token %}
        {% if form.errors %}
            <p class="error errorlist">{% trans "Your username and password do not match. Please try again." %}</p>
        {% endif %}
        <fieldset>
          <label>{% trans "Username" %}</label>
          {{form.username}}
        </fieldset>
        <fieldset>
          <label>{% trans "4-digit pin" %}</label>
          {{form.password}}
        </fieldset>
        <input type="submit" value="{% trans 'Log in' %}">
        <input type="hidden" name="next" value="{% if request.GET.next %}{{ request.GET.next }}{% else %}{{current_site.root_page.specific.url}}{% endif %}" />
        <a href="{% url 'forgot_password' %}" class="button inverted">{% trans "Forgot PIN" %}</a>
      </form>
      </div>
    </div>
  </div>
{% endblock %}
