{% extends "base.html" %}
{% load static core_tags i18n poll_votings %}

{% block content %}
	<div class="list-inline">
		{% if form.choice.errors %}<p><strong>{{form.choice.errors|join:", " }}</strong></p>{% endif %}
		<h3>{{ question.title }}</h3>
		<form action="{% url 'molo.polls:vote' question.id %}" method="post">
			{% csrf_token %}
			{% load_choices_for_poll_page question as choices %}
			{% for choice in choices %}
				{% if question.allow_multiple_choice%}
					<input type="checkbox" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.get_main_language_page.id }}" />
					<label for="choice{{ forloop.counter }}">{{ choice.title }}</label>
					<br>
				{% else %}
					<input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.get_main_language_page.id }}" />
					<label for="choice{{ forloop.counter }}">{{ choice.title }}</label>
					<br>
				{% endif %}
			{% endfor %}
			<div>
				<input type="submit" value="{% trans "Vote" %}"/>
				<br>
				<a href="{{request.site.root_page.url}}">{% trans "Home" %}</a>
			</div>
		</form>
	</div>
{% endblock %}
