{% extends "base.html" %} {% block content %}
{{ _('Back to Roles') }}

{% if role %} {{ _('Edit Role') }}: {{ role.name }} {% else %} {{ _('Create New Role') }} {% endif %}

{% if role and role.is_system_role %} {{ _('System role names cannot be changed') }} {% else %} {{ _('A unique name for this role') }} {% endif %}

{{ _('Optional description of this role') }}

{{ _('Permissions') }}

{{ _('Select the permissions this role should have:') }}

{% set categories = {} %} {% for permission in all_permissions %} {% if permission.category not in categories %} {% set _ = categories.update({permission.category: []}) %} {% endif %} {% set _ = categories[permission.category].append(permission) %} {% endfor %}
{% for category, perms in categories.items() %}

{{ category.replace('_', ' ') }}

{% for permission in perms %} {% endfor %}
{% endfor %}
{% if modules_by_category is defined %}

{{ _('Module visibility') }}

{{ _('Select which modules should be hidden for this role. Hidden modules will not appear in the navigation and cannot be accessed directly.') }}

{% for category, modules in modules_by_category %} {% if modules and modules|length > 0 %}

{{ category.value.replace('_', ' ') }}

{% for module in modules %} {% endfor %}
{% endif %} {% endfor %}
{% endif %}
{{ _('Cancel') }}
{% endblock %}