2019-09-10 17:12:56 +02:00
|
|
|
{% block permission_row %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2019-09-11 16:46:59 +02:00
|
|
|
{% if multi_checkbox %}
|
|
|
|
|
2022-07-24 18:44:05 +02:00
|
|
|
<div class="form-check">
|
|
|
|
<input type="checkbox" class="form-check-input tristate permission_multicheckbox" id="mulit_check_{{ form.vars.label }}">
|
|
|
|
<label class="form-check-label" for="mulit_check_{{ form.vars.label }}">
|
2019-09-11 16:46:59 +02:00
|
|
|
<b>{{ form.vars.label | trans }}</b>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
<b>{{ form.vars.label | trans }}</b>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{# #}
|
2019-09-10 17:12:56 +02:00
|
|
|
{{ form_errors(form) }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% for op in form %}
|
|
|
|
{{ form_widget(op) }}
|
|
|
|
{{ form_errors(op) }}
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block permission_group_row %}
|
|
|
|
{{ form_errors(form) }}
|
|
|
|
<table class="table table-bordered table-sm">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{% trans %}permission.edit.permission{% endtrans %}</th>
|
|
|
|
<th>{% trans %}permission.edit.value{% endtrans %}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for perm in form %}
|
|
|
|
{{ form_row(perm) }}
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block permissions_row %}
|
2019-09-11 13:37:51 +02:00
|
|
|
{{ form_errors(form) }}
|
2019-09-11 16:54:12 +02:00
|
|
|
|
|
|
|
{% if show_legend %}
|
|
|
|
<div class="mb-2">
|
|
|
|
<label><b>{% trans %}permission.legend.title{% endtrans %}:</b></label>
|
|
|
|
<div>
|
|
|
|
<div class="custom-control custom-control-inline custom-checkbox">
|
2022-07-24 18:44:05 +02:00
|
|
|
<input type="checkbox" hidden class="form-check-input">
|
|
|
|
<label class="form-check-label">{% trans %}permission.legend.disallow{% endtrans %}</label>
|
2019-09-11 16:54:12 +02:00
|
|
|
</div>
|
|
|
|
<div class="custom-control custom-control-inline custom-checkbox">
|
2022-07-24 18:44:05 +02:00
|
|
|
<input class="form-check-input" type="checkbox" hidden checked>
|
|
|
|
<label class="form-check-label">{% trans %}permission.legend.allow{% endtrans %}</label>
|
2019-09-11 16:54:12 +02:00
|
|
|
</div>
|
|
|
|
<div class="custom-control custom-control-inline custom-checkbox">
|
2022-07-24 18:44:05 +02:00
|
|
|
<input type="checkbox" class="tristate form-check-input" hidden indeterminate="indeterminate">
|
|
|
|
<label class="form-check-label">{% trans %}permission.legend.inherit{% endtrans %}</label>
|
2019-09-11 16:54:12 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2019-09-10 17:12:56 +02:00
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
{% for group in form %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link {% if loop.first %}active{% endif %}"
|
2022-07-24 18:14:33 +02:00
|
|
|
data-bs-toggle="tab" role="tab" href="#group_row_{{ group.vars.name }}">{{ group.vars.label | trans }}</a>
|
2019-09-10 17:12:56 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content mt-2">
|
|
|
|
{% for group in form %}
|
|
|
|
<div class="tab-pane {% if loop.first %}active{% endif %}" id="group_row_{{ group.vars.name }}">
|
|
|
|
{{ form_row(group) }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|