{% extends 'layouts/login.html' %}
{% import 'macros/form.html' as f with context %}

{% block title %}Sign in to access your account{% endblock %}

{% block body %}
  <div class="row">
    <div class="col-md-4 col-md-offset-4 well">
      {% call f.form_tag('user.login') %}
        <legend>Sign in to continue</legend>

        {% call f.form_group(form.identity, css_class='sm-margin-bottom',
                             autofocus='autofocus') %}
        {% endcall %}

        {% call f.form_group(form.password, css_class='sm-margin-bottom') %}
        {% endcall %}

        <div class="row">
          <div class="col-md-6">
            <button type="submit" class="btn btn-primary btn-block">
              Sign in
            </button>
          </div>
          <div class="col-md-6">
            <div class="visible-xs visible-sm sm-margin-top"></div>
            <a href="{{ url_for('user.signup') }}"
               class="btn btn-default btn-block">
              Register
            </a>
          </div>
        </div>
      {% endcall %}

      <div class="text-center md-margin-top">
        <a href="{{ url_for('user.begin_password_reset') }}" class="text-muted">
          Forgot your password?
        </a>
      </div>
    </div>
  </div>
{% endblock %}
