Skip to content
Snippets Groups Projects
Commit 9a48ddcd authored by Ben Adida's avatar Ben Adida
Browse files

made ballot preview visible even if election is not frozen

parent e2d7036e
Branches
Tags
No related merge requests found
{% extends TEMPLATE_BASE %}
{% block content %}
<h2 class="title">Election {{election.name}} Not Yet Open</h2>
<p>
This election is not yet open. You probably got here from the Ballot Preview.
</p>
<p>
<a href="{% url helios.views.one_election_view election.uuid %}">back to the election</a>
</p>
{% endblock %}
...@@ -265,14 +265,14 @@ Anyone can vote in this election. ...@@ -265,14 +265,14 @@ Anyone can vote in this election.
<a href="{% url helios.views.one_election_audited_ballots election.uuid %}">Audited Ballots</a> <a href="{% url helios.views.one_election_audited_ballots election.uuid %}">Audited Ballots</a>
</p> </p>
{% endif %}
{% if not election.voting_has_started %} {% if not election.voting_has_started %}
<p style="font-size: 1.2em;"> <p style="font-size: 1.2em;">
<a href="{{SECURE_URL_HOST}/booth/vote.html?election_url={% url helios.views.one_election election.uuid %}">preview booth</a> <a href="{{SECURE_URL_HOST}/booth/vote.html?election_url={% url helios.views.one_election election.uuid %}">preview booth</a>
</p> </p>
{% endif %} {% endif %}
{% endif %}
{% if election.voting_has_stopped %} {% if election.voting_has_stopped %}
<p style="font-size: 1.2em;"> <p style="font-size: 1.2em;">
{% if election.result %} {% if election.result %}
......
...@@ -522,7 +522,8 @@ def post_audited_ballot(request, election): ...@@ -522,7 +522,8 @@ def post_audited_ballot(request, election):
return SUCCESS return SUCCESS
@election_view(frozen=True) # we don't require frozen election to allow for ballot preview
@election_view()
def one_election_cast(request, election): def one_election_cast(request, election):
""" """
on a GET, this is a cancellation, on a POST it's a cast on a GET, this is a cancellation, on a POST it's a cast
...@@ -593,7 +594,7 @@ def password_voter_login(request, election): ...@@ -593,7 +594,7 @@ def password_voter_login(request, election):
return HttpResponseRedirect(settings.SECURE_URL_HOST + return_url) return HttpResponseRedirect(settings.SECURE_URL_HOST + return_url)
@election_view(frozen=True) @election_view()
def one_election_cast_confirm(request, election): def one_election_cast_confirm(request, election):
user = get_user(request) user = get_user(request)
...@@ -601,6 +602,10 @@ def one_election_cast_confirm(request, election): ...@@ -601,6 +602,10 @@ def one_election_cast_confirm(request, election):
if not request.session.has_key('encrypted_vote'): if not request.session.has_key('encrypted_vote'):
return HttpResponseRedirect(settings.URL_HOST) return HttpResponseRedirect(settings.URL_HOST)
# election not frozen or started
if not election.voting_has_started():
return render_template(request, 'election_not_started', {'election': election})
voter = get_voter(request, user, election) voter = get_voter(request, user, election)
# auto-register this person if the election is openreg # auto-register this person if the election is openreg
......
...@@ -18,7 +18,7 @@ You will then be guided to re-encrypt your choices for final casting. ...@@ -18,7 +18,7 @@ You will then be guided to re-encrypt your choices for final casting.
<h3>Your ballot is ready to be submitted</h3> <h3>Your ballot is ready to be submitted</h3>
<p> <p>
<em>Don't forget to click "Proceed to Cast" below!</em> <em>Don't forget to click "Proceed to Submission" below!</em>
</p> </p>
<p>Please <b><u>keep a record</u></b> of your smart ballot tracker [<a onclick="BOOTH.show_receipt(); return false;" href="#">print</a>]:<br /><br /> <p>Please <b><u>keep a record</u></b> of your smart ballot tracker [<a onclick="BOOTH.show_receipt(); return false;" href="#">print</a>]:<br /><br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment