mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-23 15:23:52 -05:00
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 %}
|
||||
|
23
brutaldon/templates/polls/new_partial.html
Normal file
23
brutaldon/templates/polls/new_partial.html
Normal file
@ -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
Block a user