View un-voted-in polls; can't vote in them just yet.
This commit is contained in:
parent
83f46babe5
commit
a5a67ccb54
|
@ -59,6 +59,7 @@
|
|||
{% include "polls/completed_partial.html" with toot=toot %}
|
||||
{% else %}
|
||||
<!-- Poll form -->
|
||||
{% include "polls/new_partial.html" with toot=toot %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{% load sanitizer %}
|
||||
{% load taglinks %}
|
||||
{% load static %}
|
||||
|
||||
<form method="POST" action="/vote/{{ toot.poll.id }}">
|
||||
{% for option in toot.poll.options %}
|
||||
<div class="field">
|
||||
|
||||
{% if toot.poll.multiple %}
|
||||
<input type="checkbox" id="poll-{{ toot.poll.id }}-{{ forloop.counter0 }}"
|
||||
class="checkbox" >
|
||||
{% else %}
|
||||
<input type="radio" id="poll-{{ toot.poll.id }}-{{ forloop.counter0 }}"
|
||||
name="poll-{{ toot.poll.id }}">
|
||||
{% endif %}
|
||||
|
||||
<label for="poll-{{ toot.poll.id }}-{{ forloop.counter0 }}">
|
||||
{{ option.title }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<input type="submit" class="button is-primary" name="Vote" value="Vote">
|
||||
</form>
|
Loading…
Reference in New Issue