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

{% block title %}Register{% endblock %}

{% block stylesheets %}
   {{ parent() }}

    <style>
        .registar{
            margin: 0 auto;
            width: 32%;
        }
        @media (max-width: 600px) {
            .registar{
                padding: 15px;
                width: 100%;
            }

        }
    </style>
{% endblock %}
{% block body %}
    <div class="registar">
        {% for flash_error in app.flashes('verify_email_error') %}
            <div class="alert alert-danger" role="alert">{{ flash_error }}</div>
        {% endfor %}

        <div class="card my-5" >
            <div class="card-body">
                <h4 class="text-center">Registar usuário</h4>

                {{ form_errors(registrationForm) }}

                {{ form_start(registrationForm) }}
                <div class="card-group mb-2">
                    <label>Nome*</label>
                    {{ form_widget(registrationForm.nome,{attr:{'placeholder':'Digite seu nome'}}) }}
                    {{ form_errors(registrationForm.nome) }}
                </div>
                <div class="card-group mb-2">
                    <label>E-mail*</label>
                    {{ form_widget(registrationForm.email,{attr:{'placeholder':'Digite seu e-mail'}}) }}
                    {{ form_errors(registrationForm.email) }}
                </div>
                <div class="card-group mb-2">
                    <label>Telefonico*</label>
                    {{ form_widget(registrationForm.contato,{attr:{'placeholder':'Digite seu contato telefonico'}}) }}
                    {{ form_errors(registrationForm.contato) }}
                </div>
                <div class="card-group mb-2">
                    <label>Área de interesse de estudos*</label>
                    {{ form_widget(registrationForm.areaDeestudos) }}
                    {{ form_errors(registrationForm.areaDeestudos) }}
                </div>
                <div class="card-group mb-2">
                    <label>Senha*</label>
                    {{ form_widget(registrationForm.plainPassword,{attr:{'placeholder':'Digite sua senha'}}) }}
                    {{ form_errors(registrationForm.plainPassword) }}
                </div>



                {{ form_widget(registrationForm.agreeTerms) }}

                <button type="submit" class="btn btn-primary">Registar</button>
                {{ form_end(registrationForm) }}
            </div>
        </div>

    </div>

    <br/>
    <br/>

{% endblock %}
