Part-DB.Part-DB-server/templates/Form/permissionLayout.html.twig

89 lines
3.1 KiB
Twig
Raw Normal View History

{% block permission_row %}
<tr>
<td>
{% if multi_checkbox %}
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input tristate permission_multicheckbox" id="mulit_check_{{ form.vars.label }}">
<label class="custom-control-label" for="mulit_check_{{ form.vars.label }}">
<b>{{ form.vars.label | trans }}</b>
</label>
</div>
{% else %}
<b>{{ form.vars.label | trans }}</b>
{% endif %}
{# #}
{{ 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 %}
{{ 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">
<input type="checkbox" hidden class="custom-control-input">
<label class="custom-control-label">{% trans %}permission.legend.disallow{% endtrans %}</label>
</div>
<div class="custom-control custom-control-inline custom-checkbox">
<input class="custom-control-input" type="checkbox" hidden checked>
<label class="custom-control-label">{% trans %}permission.legend.allow{% endtrans %}</label>
</div>
<div class="custom-control custom-control-inline custom-checkbox">
<input type="checkbox" class="tristate custom-control-input" hidden indeterminate="indeterminate">
<label class="custom-control-label">{% trans %}permission.legend.inherit{% endtrans %}</label>
</div>
</div>
</div>
{% endif %}
<ul class="nav nav-tabs">
{% for group in form %}
<li class="nav-item">
<a class="nav-link {% if loop.first %}active{% endif %}"
data-toggle="tab" role="tab" href="#group_row_{{ group.vars.name }}">{{ group.vars.label | trans }}</a>
</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 %}