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/list_accesses_for_delegatio...

84 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% load acs_filters %}
{% block content %}
<h2>{% trans "Accesses you can delegate" %}</h2>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% if list_accesses and alias and who_to_display %}
<p>
<ul>
{% for p, what_list, how_list in list_accesses %}
<li>
<p>
<h3>{% trans "From permission" %} "{{ p.who }} {% trans "on" %} {{ p.what.name }} {% trans "for" %} {{ p.how.name}}", {% trans "you can delegate" %}:</h3>
<form method="post" action="/delegate_access">
<input type="hidden" name="alias_id" value="{{ alias.id }}"/>
<input type="hidden" name="permission_id" value="{{ p.id }}"/>
<input type="hidden" name="back_url" value="{{ back_url }}"/>
<p>
<label>{% trans "Choose what" %}</label>
<select name="what_matches" id="id_what_matches">
{% for it in what_list %}
<option value="{{ it.id }}_{{ it|klass }}">{{ it.name }}</option>
{% endfor %}
</select>
</p>
<p>
<label>{% trans "Choose how" %}</label>
<select name="how_matches" id="id_how_matches">
{% for it in how_list %}
<option value="{{ it.id }}_{{ it|klass }}">{{ it.name }}</option>
{% endfor %}
</select>
</p>
<p>
<h4>{% trans "Choose target" %}</h4>
<select name="who_matches" id="id_who_matches">
{% for it in who_to_display %}
{% if it|klass == "UserAlias" %}
<option value="{{ it.id }}_{{ it|klass }}">{{ it.alias }}</option>
{% else %}
<option value="{{ it.id }}_{{ it|klass }}">{{ it.name }}</option>
{% endif %}
{% endfor %}
</select>
</p>
<p>
<label>{% trans "Allow a grantee to delegate this permission?" %}<input type="checkbox" name="delegable" value="delegable"/></label>
</p>
<p>
<input type="submit" name="Delegate" value="{% trans "Delegate" %}"/>
</p>
</form>
</p>
</li>
{% endfor %}
</ul>
</p>
{% else %}
<p>
{% trans "No accesses you can delegate." %}
</p>
{% endif %}
<div class="right">
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
</div>
{% endblock %}