{% extends "login/layout/sidebar-layout.html.twig" %}

{% import "login/common/macros.html.twig" as auth_macro %}

{% block title %}
    {% trans "Renew password" %}
{% endblock %}

{% block sidebar %}
    <div class="well-large sidebar-block">
        <div class="row-fluid">
            <div class="span12 authentication-sidebar-title">
                <div class="text-title">
                    {% trans "Choose a new password" %}
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">
                {{ auth_macro.flashes() }}
                <form
                    novalidate
                    name="passwordRenewForm"
                    method="POST"
                    action="{{ path('login_renew_password') }}"
                >
                    {% if form.vars.errors|length > 0 %}
                        <div class="row-fluid">
                            <div class="span12">
                                {{ form_errors(form) }}
                            </div>
                        </div>
                    {% endif %}

                    {{ auth_macro.repeatedInput(form.password, "passwordRenewForm", 'icon-lock') }}

                    {{ form_rest(form) }}
                    <div class="row-fluid">
                        <div class="span12">
                            <button type="submit" class="btn btn-success btn-trigger ">
                                {% trans "Save" %}
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
{% endblock %}

{% block scripts %}
    {{ parent() }}
    <script type="text/javascript" src="{{ path('minifier', {'f': 'assets/zxcvbn/zxcvbn-async.js,/scripts/apps/login/home/recoverPassword.js'}) }}"></script>
{% endblock %}
