{% extends "layout/base.html" %}
{% block title %}Login{% endblock %}
{% block content %}
<!-- Main -->
<h1>Login</h1>
<section>
    {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
    {% for category, message in messages %}
    <div class="alert alert-warning">
       hello {{ message }}
    </div>
    {% endfor %}
    {% endif %}
    {% endwith %}
    <form method="post" action="/login">
        {{ form.hidden_tag() }}
        <div class="field ">
            <!-- <div class="field half"> -->
            {{ form.email.label }}
            {{ form.email(size=30) }}
        </div>
        <div class="field">
            {{ form.password.label }}
            {{ form.password(size=30) }}
        </div>
        <div class="field">
            {{ form.remember}}
            {{form.remember.label}}
        </div>
        <ul class="actions">
            <li>{{form.submit}}</li>
        </ul>
        <ul class="actions">
            <li><a href="{{url_for('users.reset_request')}}">Forget Password</a></li>
        </ul>
    </form>
</section>


<script>
    if (window.history.replaceState) {
        window.history.replaceState(null, null, window.location.href);
    }
</script>

{% endblock content %}