{% macro format_checkbox(admin, right, name, users, type) %} {% set id = right['base_id'] %} {% set class = 'base_id' %} {% if type == 'sbas' %} {% set id = right['sbas_id'] %} {% set class = 'sbas_id' %} {% set sbas_class = "" %} {% else %} {% set sbas_class = "inside_sbas_" ~ right['sbas_id'] %} {% endif %} {% set display = 'block' %} {% if right[name] != users|length and name != constant('\\ACL::ACCESS') and right[constant('\\ACL::ACCESS')] != users|length and type != 'sbas' %} {% set display = 'none' %} {% endif %} {% if right[name] == 0 %} {% set class = 'unchecked' %} {% elseif right[name] == users|length %} {% set class = 'checked' %} {% else %} {% set class = 'mixed' %} {% endif %} {% if name == 'access' %} {% if class != 'checked' and type == 'base' and app.getAclForUser(admin).has_access_to_base(id) is empty %}