74 lines
2.1 KiB
HTML
74 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
|
|
{% if title %}
|
|
<h2>{{ title }}</h2>
|
|
{% else %}
|
|
<h2>{% trans "Add or modify" %}</h2>
|
|
{% endif %}
|
|
|
|
|
|
{% if messages %}
|
|
<ul class="messages">
|
|
{% for message in messages %}
|
|
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% if aliases %}
|
|
<div>
|
|
<ul>
|
|
{% for any, self_admin in aliases %}
|
|
<li class="bigbutton">
|
|
<p>{% trans "Alias:" %} {{ any }}</p>
|
|
<p>
|
|
<form method="post" action="/del_any">
|
|
<input type="hidden" name="back_url" value="{{ back_url }}"/>
|
|
<input type="hidden" name="type_entity" value="{{ type_entity }}"/>
|
|
<input type="hidden" name="id" value="{{ any.id }}"/>
|
|
<input type="submit" name="Delete" value="{% trans "Delete" %}"/>
|
|
</form>
|
|
</p>
|
|
<p>
|
|
<form method="post" action="/switch_self_admin">
|
|
<input type="hidden" name="id" value="{{ any.id }}"/>
|
|
{% if back_url %}<input type="hidden" name="back_url" value="{{ back_url }}"/>{% endif %}
|
|
{% if self_admin %}
|
|
<input type="submit" name="Switch" value="{% trans "Switch Off Self Administration" %}"/>
|
|
{% else %}
|
|
<input type="submit" name="Switch" value="{% trans "Switch On Self Administration" %}"/>
|
|
{% endif %}
|
|
</form>
|
|
</p>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if users_not_in_policy %}
|
|
<br style="clear: both;"/>
|
|
<div>
|
|
<form method="post" action="/set_user_in_policy">
|
|
<p><label for="user_id">{% trans "Select user:" %}</label>
|
|
<select name="id" id="id_id">
|
|
{% for it in users_not_in_policy %}
|
|
<option value="{{ it.id }}">{{ it.username }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<p><label for="id_name">{% trans "Alias in namespace:" %}</label> <input id="id_alias" type="text" name="alias" maxlength="30" /> If not given, the username will be taken.</p>
|
|
<br style="clear: both;"/>
|
|
<input type="submit" name="{{ submit_name }}" value="{% trans "Add" %}"/>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="right">
|
|
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
|
|
</div>
|
|
{% endblock %}
|