blob: abc949e95d564d0cf1580e7d1d437c17af80bf12 (
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
60
61
|
{% extends "base.html" %}
{% block content %}
<h2>{% if new %}New{% else %}Edit{% endif %} poll</h2>
{% if error %}<p class='error'>{{ error }}</p>{% endif %}
<form action="{{admin_url}}" method="post">
<table class='new_poll'>
{% if not new %}<tr>
<td><label>Poll url</label></td>
<td><a href='http://{{full_base_url}}'>http://{{full_base_url}}</a></td>
<td class='form_description'>Copy this address and send it to voters who want to participate to this poll</td>
</tr>
<tr>
<td><label>Administration url</label></td>
<td><a href='http://{{full_admin_url}}'>http://{{full_admin_url}}</a></td>
<td class='form_description'>Address to modify the current poll</td>
</tr>
{% endif %}<tr>
<td><label for='author_name'>Author name</label></td>
<td>{% if new %}<input type='text' name='author_name' value='{{author_name}}'/>{% else %}{{author_name}}{% endif %}</td>
<td class='form_description'>Name, firstname or nickname of the author</td>
</tr>
<tr>
<td><label for='poll_name'>Poll name</label></td>
<td>{% if new %}<input type='text' name='poll_name' value='{{poll_name}}'/>{% else %}{{poll_name}}{% endif %}</td>
<td class='form_description'>Global name to present the poll</td>
</tr>
<tr>
<td><label for='poll_desc'>Poll description</label></td>
<td>{% if new %}<textarea name='poll_desc'>{{poll_desc}}</textarea>{% else %}{{poll_desc}}{% endif %}</td>
<td class='form_description'>Precise description of the poll</td>
</tr>
<!--<tr>
<td><label for='poll_type'>Poll type</label></td>
<td>{% if new %}<select name='poll_type'>
{% for typ in TYPES %}<option value='{{typ.0}}'{% ifequal poll_type typ.0%} selected='selected'{% endifequal %}>{{typ.1}}</option>{% endfor %}
</select>{% else %}{{type_name}}{% endif %}</td>
<td class='form_description'>Type of the poll :
<ul>
<li>Meeting is the appropriate type to set a date for a meeting.</li>
<li>Poll is the appropriate type for a simple multi-choice poll</li>
<li>Balanced poll lets voters setting negative vote for some choices</li>
<li>One choice poll</li>
</ul>
</td>
</tr>!-->
<input type='hidden' name='poll_type' value='M'/>
{% if not new %}{% if choices %}<tr>
<th>Choices</th><th> </th><th>Delete?</th>
</tr>
{% for choice in choices %}<tr>
<td> </td><td>{{choice.name}}</td><td><input type='checkbox' name='delete_{{choice.id}}'/></td>
</tr>
{% endfor %}{% endif %}<tr><td><label>New choice</label></td><td>{{choiceform}}</td></tr>
{% endif %}</table>
{% if new %}<input type='hidden' name='new' value='1'/>
<input type='submit' value='Create' />
{% else %}<input type='hidden' name='edit' value='1'/>
<input type='submit' value='Edit' />
{% endif %}</form>
{% endblock %}
|