{% macro checkbox(kind, id, text, url, checked, delete=false) %} {% if g.login.is_authenticated() %} <input class="form-check-input" type="checkbox" id="{{ kind }}-{{ id }}" {% if checked %}checked{% endif %} {% if not delete %}onchange="change_set_checkbox_status(this, '{{ kind }}', '{{ id }}', '{{ url }}')"{% else %}disabled{% endif %} autocomplete="off"> <label class="form-check-label" for="{{ kind }}-{{ id }}"> {{ text }} <i id="status-{{ kind }}-{{ id }}" class="mb-1"></i> </label> {% else %} <input class="form-check-input text-reset" type="checkbox" {% if checked %}checked{% endif %} disabled> {{ text }} {% endif %} {% endmacro %}