{#

This file is part of the Sonata package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends base_template %}

{% block sonata_nav %}
{% endblock sonata_nav %}

{% block logo %}
{% endblock logo %}

{% block sonata_left_side %}
{% endblock sonata_left_side %}

{% block body_attributes %}class="sonata-bc login-page"{% endblock %}

{% block sonata_wrapper %}
    <div class="login-box">
        {% block login_box_header %}
            <div class="login-logo">
                <a href="{{ path('sonata_admin_dashboard') }}">
                    {% if 'icon' == sonata_config.getOption('logo_content') or 'all' == sonata_config.getOption('logo_content') %}
                        <div>
                            <img style="width:64px;" src="{{ asset(sonata_config.logo) }}" alt="{{ sonata_config.title }}">
                        </div>
                    {% endif %}
                    {% if 'text' == sonata_config.getOption('logo_content') or 'all' == sonata_config.getOption('logo_content') %}
                        <span>{{ sonata_config.title }}</span>
                    {% endif %}
                </a>
            </div>
        {% endblock %}
        <div class="login-box-body">
            {% block sonata_user_reset_request_form %}
                <p class="login-box-msg">{{ 'resetting.request.submit'|trans({}, 'SonataUserBundle') }}</p>

                {{ form_start(form) }}
                    <div class="form-group has-feedback">
                        {{ form_widget(form.username, {'attr': {
                            'class': 'form-control',
                            'placeholder': 'resetting.request.username'|trans({}, 'SonataUserBundle')|replace({':': ''})
                        }}) }}
                        <span class="fas fa-user form-control-feedback"></span>
                        {{ form_errors(form.username) }}
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <button type="submit" name="submit" class="btn btn-primary btn-block btn-flat">
                                {{ 'resetting.request.submit'|trans({}, 'SonataUserBundle') }}
                            </button>
                        </div>
                    </div>
                {{ form_end(form) }}

                <a href="{{ path('sonata_user_admin_security_login') }}">
                    {{ 'title_user_authentication'|trans({}, 'SonataUserBundle') }}
                </a>
            {% endblock %}
        </div>
    </div>
{% endblock sonata_wrapper %}
