{% block fos_user_content %}
    <div class="row login_face active_face">
        <div class="col s12 col-login-first col-login">
            <h4 class="color-blue1 pull-left">Connexion</h4>
            <div class="pull-right">
                ou
                <a href="#" class="color-blue1 change_to_register">
                    Créer un compte
                </a>
            </div>
            <br class="clearfix"/>
            {{ include('@FOSUser/Security/login_content.html.twig') }}
        </div>
    </div>
    <div class="row register_face">
        <div class="col s12 col-login-first col-login">
            <h4 class="color-blue1 pull-left">Créer un compte</h4>
            <div class="pull-right">
                ou
                <a href="#" class="color-blue1 change_to_login">
                    Se connecter
                </a>
            </div>
            <br class="clearfix"/>
            {{ form_start(register_form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }}
                {{ form_errors(register_form) }}
                <div class="row">
                    <div class="input-field col s6">
                        {{ form_row(register_form.firstname, {'label': 'Prénom'}) }}
                    </div>
                    <div class="input-field col s6">
                        {{ form_row(register_form.lastname, {'label': 'Nom'}) }}
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12">
                        {{ form_row(register_form.email, {'label': 'E-mail'}) }}
                    </div>
                </div>
                <div class="hide">
                    {{ form_row(register_form.username, {'label': 'Username'}) }}
                </div>
                <div class="row">
                    <div class="input-field col s12">
                    {{ form_row(register_form.plainPassword.first, {'label': 'Mot de passe'}) }}
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12">
                    {{ form_row(register_form.plainPassword.second, {'label': 'Répéter le mot de passe'}) }}
                    </div>
                </div>
                {% if destination_login is defined %}
                    <input type="hidden" name="_target_path" value="{{ destination_login }}" />
                {% endif %}
                <div class="row">
                    <div class="input-field col s12">
                        {% set label = 'user.cgu.label'|trans({'%link_start%' : '<a style="margin-bottom:25px;" target="_blank" href="'~path('service_cgu')~'">', '%link_end%' : '</a>'}, 'messages') | raw %}
                        {{ form_errors(register_form.cgu) }}
                        {{ form_widget(register_form.cgu) }}
                        {% block form_label %}
                            {% spaceless %}
                                <label for="fos_user_registration_form_cgu">
                                    Je déclare avoir pris connaissance et accepté les termes et les <a target="_blank" href="{{ path("service_cgu") }}">conditions générales d’utilisation</a>
                                </label>
                            {% endspaceless %}
                        {% endblock %}
                    </div>
                </div>
                <div class="row m-t-30">
                    <div class="col s12 center-align">
                        <input class="btn btn-default btn-round" type="submit" id="_submit_register" name="_submit_register" value="Créer un compte" />
                    </div>
                </div>
            {{ form_end(register_form) }}
        </div>
    </div>
{% endblock fos_user_content %}
