{# Eos - Verifiable elections Copyright © 2017-18 RunasSudo (Yingtong Li) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . #}

{{ questionNum + 1 }}. {{ election.questions.__getitem__(questionNum).prompt }}

Vote for {% if election.questions.__getitem__(questionNum).min_choices == election.questions.__getitem__(questionNum).max_choices %} exactly {{ election.questions.__getitem__(questionNum).min_choices }} {% else %} between {{ election.questions.__getitem__(questionNum).min_choices }} and {{ election.questions.__getitem__(questionNum).max_choices }} {% endif %} choices. Click and drag the choices from the grey box to the blue box in order from most-preferred to least-preferred. It is in your best interests to vote for as many choices as you can.

Options voted for:
{% set flat_choices = election.questions.__getitem__(questionNum).flatten_choices() %} {% macro printchoice(choice, ticket=None) %}
{{ choice.name }}
{% if choice.party %} {% if (ticket and choice.party != ticket.name) or not ticket %}
{{ choice.party }}
{% else %}
{{ choice.party }}
{% endif %} {% elif ticket %}
{{ ticket.name }}
{% endif %}
{% endmacro %}
Options not yet voted for:
{% for choice in election.questions.__getitem__(questionNum).randomised_choices().impl %} {% if choice.choices %} {# Ticket #}
{{ choice.name }}
{% for choice2 in choice.choices.impl %} {{ printchoice(choice2, choice) }} {% endfor %}
{% else %} {{ printchoice(choice) }} {% endif %} {% endfor %}