{% extends "base.html" %}
{% from "_macros.html" import render_field_with_errors, render_remember_forgot, render_field %}

{% block content %}

<div class="login-form">
    <form action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
        <h2 class="text-center">Sign in</h2>
        {{ login_user_form.hidden_tag() }}

        {{ render_field_with_errors(login_user_form.email,
                                    placeholder='username',
                                    required="required",
                                    class="form-control",
                                    autofocus=True) }}
        {{ render_field_with_errors(login_user_form.password,
                                    placeholder=login_user_form.password.label.text,
                                    required="required",
                                    class="form-control") }}
        {{ render_field(login_user_form.submit,
                        class="btn btn-primary btn-block") }}
        {{ render_remember_forgot(login_user_form.remember,
                                  render_forgot=False,
                                  class="pull-left checkbox-inline") }}
    </form>
</div>

{% endblock %}
