This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
veridic/acs/templates/mod_role.html

75 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% load acs_filters %}
{% block content %}
{% if title %}
<h2>{{ title }}</h2>
{% else %}
<h2>{% trans "Modify an entity" %}</h2>
{% endif %}
{% if messages %}
<p>
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</p>
{% endif %}
<div>
<form method="post" action="">
{% if form.non_field_errors %}
<p>{{ form.non_field_errors }}</p>
{% endif %}
<p>
{{ form.name.errors }}
{{ form.name.label_tag }}
{{ form.name }}
</p>
{% if users_to_display %}
<p>
<label>{% trans "Users" %}</label>
<ul>
{% for user, checked in users_to_display %}
<li><label for="id_users_{{ user.id }}">
<input type="checkbox" name="users" value="{{ user.id }}" id="id_users_{{ user.id }}" {% if checked %}checked="checked"{% endif %}/>
{% if user|klass == "UserAlias" %}
{{ user.alias }}
{% else %}
{{ user.username }}
{% endif %}
</label></li>
{% endfor %}
</ul>
</p>
{% endif %}
{% if roles_to_display %}
<p>
<label>{% trans "Roles" %}</label>
<ul>
{% for r, checked in roles_to_display %}
<li><label for="id_roles_{{ r.id }}"><input type="checkbox" name="roles" value="{{ r.id }}" id="id_roles_{{ r.id }}" {% if checked %}checked="checked"{% endif %}/>{{ r.name }}</label></li>
{% endfor %}
</ul>
</p>
{% endif %}
<input id="id_id" type="hidden" name="role" value="{{ role.id }}"/>
<input type="submit" name="{{ submit_name }}" value="{% trans "Modify" %}"/>
</form>
</div>
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}