{% extends admin.getTemplate('base_list_field') %}
{% block field %}
    {%- spaceless %}
    {% if isCotisationValid(object.user) %}
        {% set text = 'label_type_yes'|trans({}, 'SonataAdminBundle') %}
        {% set class = 'label-success' %}
    {% else %}
        {% set text = 'label_type_no'|trans({}, 'SonataAdminBundle') %}
        {% set class = 'label-danger' %}
    {% endif %}
    <span class="label {{ class }}">{{ text }}</span>
{% endspaceless -%}
{% endblock %}
