{% extends "admin.html.twig" %}

{% block adminContent %}
    <h1>
        {{ 'admin.roles.title'|trans }}
        <small>
            {{ 'admin.roles.subtitle'|trans }}
        </small>
    </h1>
    
    <hr>
    
    {{ form_start(form) }}
    
        {% include 'flashMessages.html.twig' %}
    
        <div class="row">
            <div class="col-md-8">
                {{ form_row(form.nome) }}

                {{ form_row(form.descricao) }}
            </div>
            <div class="col-md-4">
                <div class="well">
                    {{ form_row(form.modulos) }}
                </div>
            </div>
        </div>

        <button type="submit" class="btn btn-primary">
            <i class="fa fa-check"></i> 
            {{ 'button.save'|trans }}
        </button>
        <a href="{{ path('admin_perfis_index') }}" class="btn btn-secondary">
            <i class="fa fa-chevron-left"></i>
            {{ 'button.back'|trans }}
        </a>
        {% if entity.id %}
            <button type="submit" class="btn btn-danger pull-right" name="_method" value="DELETE">
                <i class="fa fa-trash"></i> 
                {{ 'button.remove'|trans }}
            </button>
        {% endif %}

    {{ form_end(form) }}
{% endblock %}