| |
@@ -2,51 +2,59 @@
|
| |
|
| |
{% extends "base.html" %}
|
| |
{% block body %}
|
| |
- <div class="col-md-6 col-md-offset-3 voting-sheet">
|
| |
- <h1 class="text-xs-center"><strong>{{election.shortdesc}}</strong></h1>
|
| |
|
| |
- <p class="text-xs-center">{{election.description}}</p>
|
| |
+ {% if nextaction == 'vote' %}
|
| |
+ {% include "_claim_badge_page.html" %}
|
| |
+ {% endif %}
|
| |
|
| |
- <p class="text-xs-center"><a href="{{election.url}}">[More Information]</a></p>
|
| |
+ <div class="row">
|
| |
+ <div class="col-md-6 col-md-offset-3 voting-sheet">
|
| |
+ <h1 class="text-xs-center"><strong>{{election.shortdesc}}</strong></h1>
|
| |
|
| |
- <form action="{{ url_for('vote', election_alias=election.alias) }}" method="post">
|
| |
- <div class="list-group">
|
| |
- {% for field in form if field.widget.input_type != 'hidden' %}
|
| |
- {% if field.type == "BooleanField" %}
|
| |
- <div class="list-group-item">
|
| |
- {{field}}
|
| |
- {{field.label}}
|
| |
- </div>
|
| |
- {% elif election.voting_type == "irc"%}
|
| |
- <div class="list-group-item">
|
| |
- {{ field.label }}
|
| |
- {{ field(class_="c-select pull-xs-right") }}
|
| |
- </div>
|
| |
- {% else %}
|
| |
- {% for subfield in field %}
|
| |
+ <p class="text-xs-center">{{election.description}}</p>
|
| |
+
|
| |
+ <p class="text-xs-center"><a href="{{election.url}}">[More Information]</a></p>
|
| |
+
|
| |
+ <p>Here are the candidates for the {{ election.seats_elected }} seat(s) open:</p>
|
| |
+ <form action="{{ url_for('vote', election_alias=election.alias) }}" method="post">
|
| |
+ <div class="list-group">
|
| |
+ {% for field in form if field.widget.input_type != 'hidden' %}
|
| |
+ {% if field.type == "BooleanField" %}
|
| |
<div class="list-group-item">
|
| |
- {{ subfield }}
|
| |
- {{ subfield.label }}
|
| |
+ {{field}}
|
| |
+ {{field.label}}
|
| |
</div>
|
| |
+ {% elif election.voting_type == "irc"%}
|
| |
+ <div class="list-group-item">
|
| |
+ {{ field.label }}
|
| |
+ {{ field(class_="c-select pull-xs-right") }}
|
| |
+ </div>
|
| |
+ {% else %}
|
| |
+ {% for subfield in field %}
|
| |
+ <div class="list-group-item">
|
| |
+ {{ subfield }}
|
| |
+ {{ subfield.label }}
|
| |
+ </div>
|
| |
+ {% endfor %}
|
| |
+ {% endif %}
|
| |
{% endfor %}
|
| |
- {% endif %}
|
| |
- {% endfor %}
|
| |
- </div>
|
| |
+ </div>
|
| |
|
| |
- {% if g.fas_user %}
|
| |
- <p>
|
| |
- {% if nextaction == 'vote' %}
|
| |
- <input type="hidden" name="action" value="submit" />
|
| |
- <input class="btn btn-primary btn-block m-t-1" type="submit" name="{{nextaction}}" value="Submit your vote" />
|
| |
- {% else %}
|
| |
- <input type="hidden" name="action" value="preview" />
|
| |
- <input class="btn btn-info btn-block m-t-1" type="submit" name="{{nextaction}}" value="Preview your vote" />
|
| |
+ {% if g.fas_user %}
|
| |
+ <p>
|
| |
+ {% if nextaction == 'vote' %}
|
| |
+ <input type="hidden" name="action" value="submit" />
|
| |
+ <input class="btn btn-primary btn-block m-t-1" type="submit" name="{{nextaction}}" value="Submit your vote" />
|
| |
+ {% else %}
|
| |
+ <input type="hidden" name="action" value="preview" />
|
| |
+ <input class="btn btn-info btn-block m-t-1" type="submit" name="{{nextaction}}" value="Preview your vote" />
|
| |
+ {% endif %}
|
| |
+ </p>
|
| |
+ {{ form.csrf_token }}
|
| |
{% endif %}
|
| |
- </p>
|
| |
- {{ form.csrf_token }}
|
| |
- {% endif %}
|
| |
- </form>
|
| |
- </div>
|
| |
+ </form>
|
| |
+ </div>
|
| |
+ </div>
|
| |
<!-- Make this conditional on whether the user is logged in and can vote in the election -->
|
| |
{% if election.legal_voters.count() != 0 %}
|
| |
<p>
|
| |
@@ -57,7 +65,5 @@
|
| |
<li>{{group.group_name}}</li>
|
| |
{% endfor %}
|
| |
</ul>
|
| |
- {% else %}
|
| |
- <p />
|
| |
{% endif %}
|
| |
{% endblock %}
|
| |
Each commit of this PR can be reviewed separately, they all contain some small fixes or small improvements.