{% extends "@templates/"~template~"/view/base.html.twig" %}

{% block content %}
    <section class="forgotPassword">
        <div class="grid-container">
            <div class="grid-x align-middle">
                <div class="cell header text-center">
                    <h1>Zresetuj swoje hasło</h1>
                </div>
            </div>
            {% for message in app.flashes('user.forgot.error') %}
                <div class="grid-x messagesCallout">
                    <div class="cell">
                        <div class="callout alert">
                            {{ message }}
                        </div>
                    </div>
                </div>
            {% endfor %}
            {% for message in app.flashes('user.forgot.success') %}
                <div class="grid-x messagesCallout">
                    <div class="cell">
                        <div class="callout success">
                            {{ message }}
                        </div>
                    </div>
                </div>
            {% endfor %}
            <div class="grid-x align-center">
                <div class="cell text-center">
                    <p class="messagesResetPassword">Wpisz swojego maila aby wysłać wiadomość w celu zresetowania hasła.</p>
                    {{ form_start(form) }}
                    {% if form_errors(form) is not empty %}
                        <div class="callout alert">
                            {{ form_errors(form) }}
                        </div>
                    {% endif %}
                    <div class="fieldLogin">
                        {% if form_errors(form.email) is not empty %}
                            <div class="callout alert">
                                {{ form_errors(form.email) }}
                            </div>
                        {% endif %}
                        {{ form_widget(form.email, {'attr': {'class': 'float-center'},}) }}
                    </div>
                    <div class="formLoginButton text-center">
                        <button type="submit" class="button">
                            <span>ZRESETUJ HASŁO</span>
                        </button>
                    </div>
                    {{ form_end(form) }}
                </div>
            </div>
            <div class="grid-x forgotPassword">
                <div class="cell text-center">
                    <a href="{{ path('wi_front_user_login') }}" title="zaloguj się">
                        <span>Przypomniałeś sobie hasło? <strong>Zaloguj się.</strong></span>
                    </a>
                </div>
            </div>
            <div class="grid-x forgotPassword">
                <div class="cell text-center">
                    <a href="{{ path('wi_front_user_register') }}" title="zaloguj się">
                        <span>Nie masz jeszcze konta? <strong>Zarejestruj się.</strong></span>
                    </a>
                </div>
            </div>
        </div>
    </section>
{% endblock %}