{% if value is not defined %}
    {% set value = field.value %}
{% endif %}
{% if value == 1 %}
    <span class="badge badge-success">Oui</span>
{% else %}
    <span class="badge badge-danger">Non</span>
{% endif %}
