blob: 0a8c611190f380529410789a50d1cc7f103abec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{% extends "base.html" %}
{% load markup %}
{% load i18n %}
{% block fullscript %}
<script type="text/javascript" src="{% url 'admin_i18n' %}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form_new_choice.media }}
{% endblock %}
{% block content %}
{% if not choices %}
<p class='error'>
{% blocktrans %}As long as no options were added to the poll, it will not be available.{% endblocktrans %}
</p>
{% else %}
<h2>{% trans "Choice administration" %}</h2>
<p>{% trans "After you've finished to add or edit choices for this poll, click on:" %} <a href="{% url 'edit' poll.admin_url %}"><button>{% trans "Next"%}</button></a></p>
{% endif %}
{% include 'editChoices.html' %}
{% if choices %}
<div class="new_poll" style="margin-top:20px;">
<div class="field_label">{% trans "Edit available choices" %}</div>
<div>
<table>
<tr>
{%if not poll.dated_choices%}<th style="word-wrap:none;">{% trans "Position" %}</th>{%endif%}
<th>{% trans "Value" %}</th>
<th>{% trans "Max votes" %}</th>
<th width="60px;">{% trans "Delete?"%} <span class="help_button" title='{% trans "To remove a choice, check this box on the good line and click on Edit."%}'>?</span></th>
</tr>
{% for choice in choices %}
<form action="." method="post">
{% csrf_token %}
{{choice.form.poll}}{{choice.form.order}}<tr>
{%if not poll.dated_choices%}
<td style="font-size:1.5em;">
<a href='?up_choice={{choice.id}}' class='arrow' title='{% trans "Move up" %}'>↑</a>
<br/>
<a style="color:red;" href='?down_choice={{choice.id}}' title='{% trans "Move down" %}' class='arrow'>↓</a>
</td>
{%endif%}
<td>{{choice.form.name}}</td>
<td>{{choice.form.limit}}</td>
<td><input type='checkbox' name='delete_{{choice.id}}'/></td>
<td><input type='hidden' name='edit' value='{{choice.id}}'/></td>
<td><input type='submit' value='{% trans "Edit" %}' class='submit'/></td>
</tr>
</form>{% endfor %}
</table>
</div>
</div>
<div style="clear:both"></div>
{% endif %}
{% endblock %}
|