{#

This file is part of the Sonata package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% block sonata_security_roles_widget %}
{% apply spaceless %}
    <div class="editable">
        <h4>{{ 'field.label_roles_editable'|trans({}, "SonataUserBundle") }}</h4>
        {{ block('choice_widget') }}
    </div>
    {% if read_only_choices|length > 0 %}
    <div class="readonly">
        <h4>{{ 'field.label_roles_readonly'|trans({}, "SonataUserBundle") }}</h4>
        <ul>
        {% for choice in read_only_choices %}
            <li>{{ choice }}</li>
        {% endfor %}
        </ul>
    </div>
    {% endif %}
{% endapply %}
{% endblock sonata_security_roles_widget %}

{% block sonata_roles_matrix_widget %}
{% apply spaceless %}
    {{ renderMatrix(form)|raw }}
    <ul class="list-unstyled">
        {{ renderRolesList(form)|raw }}
    </ul>
{% endapply %}
{% endblock sonata_roles_matrix_widget %}
