brutaldon-interfaccia-web-m.../brutaldon/templates/polls/new_partial.html

35 lines
1.2 KiB
HTML
Raw Normal View History

{% 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">
{% csrf_token %}
{% for option in toot.poll.options %}
<div class="field">
{% if toot.poll.multiple %}
<label class="checkbox">
<input type="checkbox"
name="poll-multiple"
value="{{ forloop.counter0 }}">
{{ option.title }}
</label>
{% else %}
<label class="radio">
<input type="radio"
name="poll-single"
value="{{ forloop.counter0 }}">
{{ option.title }}
</label>
{% 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>
</form>