{# Overriden the original "two_factor" template to remove extending base template and slightly adjust style #}

{% load i18n two_factor %}

  <section class="row mx-0">
      <span class="oval-blue login-shape-left"></span>
      <span class="polygon-yellow login-shape-right"></span>
      <div class="form--login is-flex form--register--teacher">
          <div class="form col-xs-12 col-sm-8 col-md-8 col-lg-9 center-block">
  <h4>{% block title %}{% trans "Login as a teacher " %}{% endblock %}</h4>

  {% if wizard.steps.current == 'auth' %}
    <p>{% blocktrans %}Enter your credentials.{% endblocktrans %}</p>
  {% elif wizard.steps.current == 'token' %}
    {% if device.method == 'call' %}
      <p>{% blocktrans trimmed %}We are calling your phone right now, please enter the
        digits you hear.{% endblocktrans %}</p>
    {% elif device.method == 'sms' %}
      <p>{% blocktrans trimmed %}We sent you a text message, please enter the tokens we
        sent.{% endblocktrans %}</p>
    {% else %}
      <p class="text-left">{% blocktrans trimmed %}Please enter the token generated by your token
        generator.{% endblocktrans %}</p>
    {% endif %}
  {% elif wizard.steps.current == 'backup' %}
    <p class="text-left">{% blocktrans trimmed %}Use this form for entering backup tokens for logging in.
      These tokens have been generated for you to print and keep safe. Please
      enter one of these backup tokens to login to your account.{% endblocktrans %}</p>
  {% endif %}

  <form action="" method="post" class="d-flex flex-column">{% csrf_token %}
    {% if wizard.steps.current == 'backup' %}
      {% include "two_factor/_wizard_forms_token.html" %}
    {% else %}
      {% include "two_factor/_wizard_forms.html" %}
    {% endif %}

    {# hidden submit button to enable [enter] key #}
    <input placeholder="" type="submit" value="" class="hidden" />
    {% if other_devices %}
      <p>{% trans "Or, alternatively, use one of your backup phones:" %}</p>
      <p>
        {% for other in other_devices %}
        <button name="challenge_device" value="{{ other.persistent_id }}"
                class="btn btn-secondary" type="submit">
          {{ other|device_action }}
        </button>
      {% endfor %}</p>
    {% endif %}
    {% if backup_tokens %}
      <p>
        <div class="d-flex flex-column justify-content-start align-items-start">

          <button name="wizard_goto_step" type="submit" value="backup"
          class="button button--primary">{% trans "Use a backup token" %}</button>
        </div>
        </p>
        {% endif %}
              {% include "two_factor/_wizard_actions_submit.html" %}
            </form>
          </div>
        </div>
      </section>
