mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2025-04-13 18:12:03 +02: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 %}
|
{% include "polls/completed_partial.html" with toot=toot %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<!-- Poll form -->
|
<!-- Poll form -->
|
||||||
|
{% include "polls/new_partial.html" with toot=toot %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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…
x
Reference in New Issue
Block a user