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

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

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

{% block sidebar %}
    <div class="well-large sidebar-block">
        <div class="row-fluid">
            <div class="span12 authentication-sidebar-title">
                <div class="text-title">
                    {{ "Choose a new password" | trans }}
                </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", 'fa fa-lock') }}

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

{% block scripts %}
    {{ parent() }}
    <script>
        authenticateApp.bootstrap({
            state: 'renewPassword'
        });
    </script>
{% endblock %}
