14 lines
684 B
HTML
14 lines
684 B
HTML
|
{% macro checkbox(kind, id, text, url, checked, delete=false) %}
|
||
|
{% if g.login.is_readonly() %}
|
||
|
<input class="form-check-input text-reset" type="checkbox" {% if checked %}checked{% endif %} disabled>
|
||
|
{{ text }}
|
||
|
{% else %}
|
||
|
<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>
|
||
|
{% endif %}
|
||
|
{% endmacro %}
|