67 lines
1.7 KiB
HTML
67 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
|
|
{% if title %}
|
|
<h2>{{ title }}</h2>
|
|
{% else %}
|
|
<h2>{% trans "Modify a view" %}</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 objects_to_display %}
|
|
<p>
|
|
<label>{% trans "Objects" %}</label>
|
|
<ul>
|
|
{% for object, checked in objects_to_display %}
|
|
<li><label for="id_objects_{{ object.id }}"><input type="checkbox" name="acs_objects" value="{{ object.id }}" id="id_objects_{{ object.id }}" {% if checked %}checked="checked"{% endif %}/>{{ object.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if views_to_display %}
|
|
<p>
|
|
<label>{% trans "Views" %}</label>
|
|
<ul>
|
|
{% for v, checked in views_to_display %}
|
|
<li><label for="id_views_{{ v.id }}"><input type="checkbox" name="views" value="{{ v.id }}" id="id_views_{{ v.id }}" {% if checked %}checked="checked"{% endif %}/>{{ v.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<input id="id_id" type="hidden" name="view" value="{{ view.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 %}
|