{% trans_default_domain 'FOSUserBundle' %}
<div class="row">
    <div class="col s8 offset-s2">
    {#<h3>Je suis ?</h3>#}
    <h3>Merci de sélectionner votre profil :</h3>
    <button class="waves-effect waves-light btn btn-dark roleUser active" data-value="TALENT">Je suis un talent</button> 
    <button class="waves-effect waves-light btn btn-dark roleUser" data-value="COMPANY">Je suis une entreprise</button>
    <h3>Mes informations</h3>
    {{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }}
        {{ form_errors(form) }}
        <div class="row">
            <div class="input-field col s12">
                {{ form_row(form.firstname, {'label': 'Prénom'}) }}
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
                {{ form_row(form.lastname, {'label': 'Nom'}) }}
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
                {{ form_row(form.email, {'label': 'E-mail'}) }}
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
                {{ form_row(form.username, {'label': 'Nom d\'utilisateur'}) }}
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
            {{ form_row(form.plainPassword.first, {'label': 'Mot de passe'}) }}
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
            {{ form_row(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 href="'~path('service_cgu')~'">', '%link_end%' : '</a>'}, 'messages') | raw %}
            {{ form_errors(form.cgu) }}
            {{ form_widget(form.cgu) }}
            {{ form_label(form.cgu) }}
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
                Lire les conditions générales d'utilisations</a>
                <br /><br />
            </div>
        </div>
        <div class="row">
            <div class="input-field col s12">
            {{ form_rest(form) }}
            </div>
        </div>
        <div>
            <input class="btn btn-default" type="submit" value="{{ 'registration.submit'|trans }}" />
            {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                {{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} |
                <a href="{{ path('fos_user_security_logout') }}">
                    {{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
                </a>
            {% else %}
                <a href="{{ path('fos_user_security_login') }}">
                    <span class="tiny-text font-black m-l-10">
                    Je possède déjà un compte Talents Tube
                    </span>
                </a>
            {% endif %}
        </div>
    {{ form_end(form) }}
    </div>
</div>