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 an activity" %}</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 actions_to_display %}
|
|
<p>
|
|
<label>{% trans "Actions" %}</label>
|
|
<ul>
|
|
{% for action, checked in actions_to_display %}
|
|
<li><label for="id_actions_{{ action.id }}"><input type="checkbox" name="actions" value="{{ action.id }}" id="id_actions_{{ action.id }}" {% if checked %}checked="checked"{% endif %}/>{{ action.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if activities_to_display %}
|
|
<p>
|
|
<label>{% trans "Activities" %}</label>
|
|
<ul>
|
|
{% for a, checked in activities_to_display %}
|
|
<li><label for="id_activities_{{ a.id }}"><input type="checkbox" name="activities" value="{{ a.id }}" id="id_activities_{{ a.id }}" {% if checked %}checked="checked"{% endif %}/>{{ a.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<input id="id_id" type="hidden" name="activity" value="{{ activity.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 %}
|