summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authoretienne2008-08-08 13:23:16 +0000
committeretienne2008-08-08 13:23:16 +0000
commit2b384dd33ecd0a17823e60cded5d3b111ea8133e (patch)
tree4f2cbd4dde85482827d3f15b839608bdf91637e9 /templates
parent25cb65439859e7fd3e9b28815d3d620affc145ec (diff)
Possibility to delete a vote. Few bug correction. Documentation. Cleaner functions.
Diffstat (limited to 'templates')
-rw-r--r--templates/createOrEdit.html6
-rw-r--r--templates/vote.html8
2 files changed, 7 insertions, 7 deletions
diff --git a/templates/createOrEdit.html b/templates/createOrEdit.html
index cee7616..073dcfd 100644
--- a/templates/createOrEdit.html
+++ b/templates/createOrEdit.html
@@ -2,12 +2,12 @@
{% block content %}
{% if not new and not choices %}
- <p class='error'>As long as no option was added to the poll, it will not be made available.</p>
+ <p class='error'>As long as no options were added to the poll, it will not be made available.</p>
{% endif %}
<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'>
+ <table id='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>
@@ -54,7 +54,7 @@
{% for choice in choices %}<tr>
<td>&nbsp;</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>
+ {% endfor %}{% endif %}<tr><td><label>New choice</label></td><td><input type='text' name='new_choice'/></td></tr>
{% endif %}</table>
{% if new %}<input type='hidden' name='new' value='1'/>
<input type='submit' value='Create' />
diff --git a/templates/vote.html b/templates/vote.html
index 19150d2..1b862c4 100644
--- a/templates/vote.html
+++ b/templates/vote.html
@@ -6,7 +6,7 @@
<p>{{poll_desc}}</p>
<form method='post' action='{{base_url}}'>
<div id='poll_table'>
- <table class='poll'>
+ <table id='poll'>
<tr>
<td class='simple'></td>
<td class='simple'></td>
@@ -16,10 +16,10 @@
<input type='hidden' name='voter' value='{{voter.id}}'/>
<td class='simple'></td>
<td><input type='text' name='author_name' value='{{voter.name}}'/></td>
- {% for vote in voter.votes %}<td><input type='checkbox' name='vote_{{vote.id}}'{%ifequal vote.vote 1%} checked='checked'{%endifequal%}/></td>{%endfor%}
+ {% for vote in voter.votes %}<td><input type='checkbox' name='{%if vote.id%}vote_{{vote.id}}{%else%}choice_{{vote}}{%endif%}'{%ifequal vote.value 1%} checked='checked'{%endifequal%}/></td>{%endfor%}
{%else%}<td class='simple'><a href='?voter={{voter.id}}'>Edit</a></td>
<td>{{voter.name}}</td>
- {% for vote in voter.votes %}<td class='{%ifequal vote.vote 1%}OK{%else%}KO{%endifequal%}'>{% ifequal vote.vote 1%}Yes{%else%}No{%endifequal%}</td>
+ {% for vote in voter.votes %}<td class='{%ifequal vote.value 1%}OK{%else%}KO{%endifequal%}'>{% ifequal vote.value 1%}Yes{%else%}No{%endifequal%}</td>
{%endfor%}
{%endifequal%}
</tr>{%endfor%}
@@ -30,7 +30,7 @@
{%for choice in choices%}<td><input type='checkbox' name='choice_{{choice.id}}'/></td>{%endfor%}
</tr>
{%endif%}
- <tr class='sum'>
+ <tr id='sum'>
<td class='simple'></td><th>Sum</th>
{% for sum in choices_sum %}<td>{{sum}}</td>
{% endfor %}