2019-07-10 02:26:52 +02:00
|
|
|
{% load sanitizer %}
|
|
|
|
{% load taglinks %}
|
|
|
|
{% load static %}
|
|
|
|
|
2019-07-10 19:25:53 +02:00
|
|
|
<form method="POST" action="{% url "vote" toot.id %}"
|
|
|
|
ic-post-to="{% url "vote" toot.id %}"
|
|
|
|
ic-target="closest article"
|
|
|
|
ic-indicator="#poll-spinner-{{ toot.id }}"
|
|
|
|
ic-replace-target="true">
|
2019-07-10 18:57:58 +02:00
|
|
|
{% csrf_token %}
|
2019-07-10 02:26:52 +02:00
|
|
|
{% for option in toot.poll.options %}
|
|
|
|
<div class="field">
|
|
|
|
{% if toot.poll.multiple %}
|
2019-07-10 18:57:58 +02:00
|
|
|
<label class="checkbox">
|
|
|
|
<input type="checkbox"
|
|
|
|
name="poll-multiple"
|
|
|
|
value="{{ forloop.counter0 }}">
|
|
|
|
{{ option.title }}
|
|
|
|
</label>
|
2019-07-10 02:26:52 +02:00
|
|
|
{% else %}
|
2019-07-10 18:57:58 +02:00
|
|
|
<label class="radio">
|
|
|
|
<input type="radio"
|
|
|
|
name="poll-single"
|
|
|
|
value="{{ forloop.counter0 }}">
|
|
|
|
{{ option.title }}
|
|
|
|
</label>
|
2019-07-10 02:26:52 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
<input type="submit" class="button is-primary" name="Vote" value="Vote">
|
2019-07-10 19:25:53 +02:00
|
|
|
<span id="poll-spinner-{{toot.id}}" class="fa fa-spinner fa-spin"
|
|
|
|
style="display:none"></span>
|
|
|
|
|
2019-07-10 02:26:52 +02:00
|
|
|
</form>
|