{% extends 'bulma.html.twig' %}

{% block title %}S'enregistrer{% endblock %}

{% block content %}

    <div class="content">
        <div class="container">
            <div class="columns is-centered">
                <div class="column is-5">
                    <div class="box">
                    {% for flash_error in app.flashes('verify_email_error') %}
                        <div class="alert alert-danger" role="alert">{{ flash_error }}</div>
                    {% endfor %}

                    <h1 class="title is-4 has-text-centered">Créer un compte utilisateur</h1>
                    {{ form_errors(registrationForm) }}

                    {{ form_start(registrationForm) }}

                    {{ form_row(registrationForm.firstName) }}
                    {{ form_row(registrationForm.lastName) }}
                    {{ form_row(registrationForm.email) }}
                    {{ form_row(registrationForm.phone) }}

                    {{ form_row(registrationForm.plainPassword)}}

                    <div class="field">
                        <label>
                        {{ form_widget(registrationForm.agreeTerms) }}
                         J'accepte les <a href="{{ path('app_terms') }}" target="_blank">conditions générales d'utilisation du service</a>.
                        </label>
                    </div>
                    
                    <button type="submit" class="button is-primary">S'enregistrer</button>
                    <a href="{{ path('app_main') }}" class="button">Annuler</a>
                    {{ form_end(registrationForm) }}
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
