You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.9 KiB
HTML
61 lines
1.9 KiB
HTML
{% extends "domain_base.html" %}
|
|
{% block domain_content %}
|
|
<form method="post">
|
|
<div class="section">
|
|
<div class="section__header">
|
|
<h1 class="section__title">{{ _('{0}: Permissions').format(domain.name) }}</h1>
|
|
</div>
|
|
<div class="section__body no-padding domain-users">
|
|
<table class="data-table">
|
|
<colgroup>
|
|
<col class="col--description">
|
|
{% for role in roles %}
|
|
<col class="col--p">
|
|
{% endfor %}
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th class="col--description">{{ _('Permissions') }}</th>
|
|
{% for role in roles %}
|
|
<th class="col--p"><span data-tooltip="{{ role }}">{{ role._id }}</span></th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
{% for family, perms in perm.PERMS_BY_FAMILY %}
|
|
<tbody>
|
|
<tr>
|
|
<td class="col--family" colspan="{{ (roles|length)+1 }}">
|
|
{{ _(family) }}
|
|
</td>
|
|
</tr>
|
|
{% for perm in perms %}
|
|
<tr>
|
|
<td class="col--description">
|
|
{{ _(perm.desc) }}
|
|
</td>
|
|
{% for role in roles %}
|
|
<td class="col--p">
|
|
<label class="compact checkbox">
|
|
<input name="{{ role._id }}" data-checkbox-group="{{ role._id }}" data-checkbox-range value="{{ perm.key }}" type="checkbox"{% if role.perm.includes(perm.key) %} checked{% endif %}{% if role._id == 'admin' %} disabled{% endif %}>
|
|
</label>
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
<div class="section__body">
|
|
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
|
<button class="rounded primary button" role="submit">
|
|
{{ _('Update Permission') }}
|
|
</button>
|
|
<button type="button" class="rounded button" onclick="window.history.go(-1)">
|
|
{{ _('Cancel') }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|