Skip to content
Snippets Groups Projects
Unverified Commit ed9cf10d authored by Marco Ciotola's avatar Marco Ciotola
Browse files

[DJ1.10] Update election_urls to have names and be reversed by name

parent 1b876a27
No related branches found
No related tags found
No related merge requests found
Showing
with 149 additions and 79 deletions
ELECTION_HOME="election@home"
ELECTION_VIEW="election@view"
ELECTION_META="election@meta"
ELECTION_EDIT="election@edit"
ELECTION_SCHEDULE="election@schedule"
ELECTION_EXTEND="election@extend"
ELECTION_ARCHIVE="election@archive"
ELECTION_COPY="election@copy"
ELECTION_BADGE="election@badge"
ELECTION_TRUSTEES_HOME="election@trustees"
ELECTION_TRUSTEES_VIEW="election@trustees@view"
ELECTION_TRUSTEES_NEW="election@trustees@new"
ELECTION_TRUSTEES_ADD_HELIOS="election@trustees@add-helios"
ELECTION_TRUSTEES_DELETE="election@trustees@delete"
ELECTION_TRUSTEE_HOME="election@trustee"
ELECTION_TRUSTEE_SEND_URL="election@trustee@send-url"
ELECTION_TRUSTEE_KEY_GENERATOR="election@trustee@key-generator"
ELECTION_TRUSTEE_CHECK_SK="election@trustee@check-sk"
ELECTION_TRUSTEE_UPLOAD_PK="election@trustee@upload-pk"
ELECTION_TRUSTEE_DECRYPT_AND_PROVE="election@trustee@decrypt-and-prove"
ELECTION_TRUSTEE_UPLOAD_DECRYPTION="election@trustee@upload-decryption"
ELECTION_RESULT="election@result"
ELECTION_RESULT_PROOF="election@result@proof"
ELECTION_BBOARD="election@bboard"
ELECTION_AUDITED_BALLOTS="election@audited-ballots"
ELECTION_GET_RANDOMNESS="election@get-randomness"
ELECTION_ENCRYPT_BALLOT="election@encrypt-ballot"
ELECTION_QUESTIONS="election@questions"
ELECTION_SET_REG="election@set-reg"
ELECTION_SET_FEATURED="election@set-featured"
ELECTION_SAVE_QUESTIONS="election@save-questions"
ELECTION_REGISTER="election@register"
ELECTION_FREEZE="election@freeze"
ELECTION_COMPUTE_TALLY="election@compute-tally"
ELECTION_COMBINE_DECRYPTIONS="election@combine-decryptions"
ELECTION_RELEASE_RESULT="election@release-result"
ELECTION_CAST="election@cast"
ELECTION_CAST_CONFIRM="election@cast-confirm"
ELECTION_PASSWORD_VOTER_LOGIN="election@password-voter-login"
ELECTION_CAST_DONE="election@cast-done"
ELECTION_POST_AUDITED_BALLOT="election@post-audited-ballot"
ELECTION_VOTERS_HOME="election@voters"
ELECTION_VOTERS_UPLOAD="election@voters@upload"
ELECTION_VOTERS_UPLOAD_CANCEL="election@voters@upload-cancel"
ELECTION_VOTERS_LIST="election@voters@list"
ELECTION_VOTERS_LIST_PRETTY="election@voters@list-pretty"
ELECTION_VOTERS_ELIGIBILITY="election@voters@eligibility"
ELECTION_VOTERS_EMAIL="election@voters@email"
ELECTION_VOTER="election@voter"
ELECTION_VOTER_DELETE="election@voter@delete"
ELECTION_BALLOTS_LIST="election@ballots@list"
ELECTION_BALLOTS_VOTER="election@ballots@voter"
ELECTION_BALLOTS_VOTER_LAST="election@ballots@voter@last"
...@@ -6,89 +6,97 @@ Ben Adida (ben@adida.net) ...@@ -6,89 +6,97 @@ Ben Adida (ben@adida.net)
from django.conf.urls import url from django.conf.urls import url
from helios.views import * from helios import views
from helios import election_url_names as names
urlpatterns = [ urlpatterns = [
# election data that is cryptographically verified # election data that is cryptographically verified
url(r'^$', one_election), url(r'^$', views.one_election, name=names.ELECTION_HOME),
# metadata that need not be verified # metadata that need not be verified
url(r'^/meta$', one_election_meta), url(r'^/meta$', views.one_election_meta, name=names.ELECTION_META),
# edit election params # edit election params
url(r'^/edit$', one_election_edit), url(r'^/edit$', views.one_election_edit, name=names.ELECTION_EDIT),
url(r'^/schedule$', one_election_schedule), url(r'^/schedule$', views.one_election_schedule, name=names.ELECTION_SCHEDULE),
url(r'^/extend$', one_election_extend), url(r'^/extend$', views.one_election_extend, name=names.ELECTION_EXTEND),
url(r'^/archive$', one_election_archive), url(r'^/archive$', views.one_election_archive, name=names.ELECTION_ARCHIVE),
url(r'^/copy$', one_election_copy), url(r'^/copy$', views.one_election_copy, name=names.ELECTION_COPY),
# badge # badge
url(r'^/badge$', election_badge), url(r'^/badge$', views.election_badge, name=names.ELECTION_BADGE),
# adding trustees # adding trustees
url(r'^/trustees/$', list_trustees), url(r'^/trustees/$', views.list_trustees, name=names.ELECTION_TRUSTEES_HOME),
url(r'^/trustees/view$', list_trustees_view), url(r'^/trustees/view$', views.list_trustees_view, name=names.ELECTION_TRUSTEES_VIEW),
url(r'^/trustees/new$', new_trustee), url(r'^/trustees/new$', views.new_trustee, name=names.ELECTION_TRUSTEES_NEW),
url(r'^/trustees/add-helios$', new_trustee_helios), url(r'^/trustees/add-helios$', views.new_trustee_helios, name=names.ELECTION_TRUSTEES_ADD_HELIOS),
url(r'^/trustees/delete$', delete_trustee), url(r'^/trustees/delete$', views.delete_trustee, name=names.ELECTION_TRUSTEES_DELETE),
# trustee pages # trustee pages
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/home$', trustee_home), url(r'^/trustees/(?P<trustee_uuid>[^/]+)/home$',
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/sendurl$', trustee_send_url), views.trustee_home, name=names.ELECTION_TRUSTEE_HOME),
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/keygenerator$', trustee_keygenerator), url(r'^/trustees/(?P<trustee_uuid>[^/]+)/sendurl$',
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/check-sk$', trustee_check_sk), views.trustee_send_url, name=names.ELECTION_TRUSTEE_SEND_URL),
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/upoad-pk$', trustee_upload_pk), url(r'^/trustees/(?P<trustee_uuid>[^/]+)/keygenerator$',
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/decrypt-and-prove$', trustee_decrypt_and_prove), views.trustee_keygenerator, name=names.ELECTION_TRUSTEE_KEY_GENERATOR),
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/upload-decryption$', trustee_upload_decryption), url(r'^/trustees/(?P<trustee_uuid>[^/]+)/check-sk$',
views.trustee_check_sk, name=names.ELECTION_TRUSTEE_CHECK_SK),
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/upoad-pk$',
views.trustee_upload_pk, name=names.ELECTION_TRUSTEE_UPLOAD_PK),
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/decrypt-and-prove$',
views.trustee_decrypt_and_prove, name=names.ELECTION_TRUSTEE_DECRYPT_AND_PROVE),
url(r'^/trustees/(?P<trustee_uuid>[^/]+)/upload-decryption$',
views.trustee_upload_decryption, name=names.ELECTION_TRUSTEE_UPLOAD_DECRYPTION),
# election voting-process actions # election voting-process actions
url(r'^/view$', one_election_view), url(r'^/view$', views.one_election_view, name=names.ELECTION_VIEW),
url(r'^/result$', one_election_result), url(r'^/result$', views.one_election_result, name=names.ELECTION_RESULT),
url(r'^/result_proof$', one_election_result_proof), url(r'^/result_proof$', views.one_election_result_proof, name=names.ELECTION_RESULT_PROOF),
# url(r'^/bboard$', one_election_bboard), # url(r'^/bboard$', views.one_election_bboard, name=names.ELECTION_BBOARD),
url(r'^/audited-ballots/$', one_election_audited_ballots), url(r'^/audited-ballots/$', views.one_election_audited_ballots, name=names.ELECTION_AUDITED_BALLOTS),
# get randomness # get randomness
url(r'^/get-randomness$', get_randomness), url(r'^/get-randomness$', views.get_randomness, name=names.ELECTION_GET_RANDOMNESS),
# server-side encryption # server-side encryption
url(r'^/encrypt-ballot$', encrypt_ballot), url(r'^/encrypt-ballot$', views.encrypt_ballot, name=names.ELECTION_ENCRYPT_BALLOT),
# construct election # construct election
url(r'^/questions$', one_election_questions), url(r'^/questions$', views.one_election_questions, name=names.ELECTION_QUESTIONS),
url(r'^/set_reg$', one_election_set_reg), url(r'^/set_reg$', views.one_election_set_reg, name=names.ELECTION_SET_REG),
url(r'^/set_featured$', one_election_set_featured), url(r'^/set_featured$', views.one_election_set_featured, name=names.ELECTION_SET_FEATURED),
url(r'^/save_questions$', one_election_save_questions), url(r'^/save_questions$', views.one_election_save_questions, name=names.ELECTION_SAVE_QUESTIONS),
url(r'^/register$', one_election_register), url(r'^/register$', views.one_election_register, name=names.ELECTION_REGISTER),
url(r'^/freeze$', one_election_freeze), # includes freeze_2 as POST target url(r'^/freeze$', views.one_election_freeze, name=names.ELECTION_FREEZE), # includes freeze_2 as POST target
# computing tally # computing tally
url(r'^/compute_tally$', one_election_compute_tally), url(r'^/compute_tally$', views.one_election_compute_tally, name=names.ELECTION_COMPUTE_TALLY),
url(r'^/combine_decryptions$', combine_decryptions), url(r'^/combine_decryptions$', views.combine_decryptions, name=names.ELECTION_COMBINE_DECRYPTIONS),
url(r'^/release_result$', release_result), url(r'^/release_result$', views.release_result, name=names.ELECTION_RELEASE_RESULT),
# casting a ballot before we know who the voter is # casting a ballot before we know who the voter is
url(r'^/cast$', one_election_cast), url(r'^/cast$', views.one_election_cast, name=names.ELECTION_CAST),
url(r'^/cast_confirm$', one_election_cast_confirm), url(r'^/cast_confirm$', views.one_election_cast_confirm, name=names.ELECTION_CAST_CONFIRM),
url(r'^/password_voter_login$', password_voter_login), url(r'^/password_voter_login$', views.password_voter_login, name=names.ELECTION_PASSWORD_VOTER_LOGIN),
url(r'^/cast_done$', one_election_cast_done), url(r'^/cast_done$', views.one_election_cast_done, name=names.ELECTION_CAST_DONE),
# post audited ballot # post audited ballot
url(r'^/post-audited-ballot', post_audited_ballot), url(r'^/post-audited-ballot', views.post_audited_ballot, name=names.ELECTION_POST_AUDITED_BALLOT),
# managing voters # managing voters
url(r'^/voters/$', voter_list), url(r'^/voters/$', views.voter_list, name=names.ELECTION_VOTERS_LIST),
url(r'^/voters/upload$', voters_upload), url(r'^/voters/upload$', views.voters_upload, name=names.ELECTION_VOTERS_UPLOAD),
url(r'^/voters/upload-cancel$', voters_upload_cancel), url(r'^/voters/upload-cancel$', views.voters_upload_cancel, name=names.ELECTION_VOTERS_UPLOAD_CANCEL),
url(r'^/voters/list$', voters_list_pretty), url(r'^/voters/list$', views.voters_list_pretty, name=names.ELECTION_VOTERS_LIST_PRETTY),
url(r'^/voters/eligibility$', voters_eligibility), url(r'^/voters/eligibility$', views.voters_eligibility, name=names.ELECTION_VOTERS_ELIGIBILITY),
url(r'^/voters/email$', voters_email), url(r'^/voters/email$', views.voters_email, name=names.ELECTION_VOTERS_EMAIL),
url(r'^/voters/(?P<voter_uuid>[^/]+)$', one_voter), url(r'^/voters/(?P<voter_uuid>[^/]+)$', views.one_voter, name=names.ELECTION_VOTER),
url(r'^/voters/(?P<voter_uuid>[^/]+)/delete$', voter_delete), url(r'^/voters/(?P<voter_uuid>[^/]+)/delete$', views.voter_delete, name=names.ELECTION_VOTER_DELETE),
# ballots # ballots
url(r'^/ballots/$', ballot_list), url(r'^/ballots/$', views.ballot_list, name=names.ELECTION_BALLOTS_LIST),
url(r'^/ballots/(?P<voter_uuid>[^/]+)/all$', voter_votes), url(r'^/ballots/(?P<voter_uuid>[^/]+)/all$', views.voter_votes, name=names.ELECTION_BALLOTS_VOTER),
url(r'^/ballots/(?P<voter_uuid>[^/]+)/last$', voter_last_vote), url(r'^/ballots/(?P<voter_uuid>[^/]+)/last$', views.voter_last_vote, name=names.ELECTION_BALLOTS_VOTER_LAST),
] ]
...@@ -23,7 +23,7 @@ You are logged in as <u>{{voter.display_html_big|safe}}</u><br /><br /> ...@@ -23,7 +23,7 @@ You are logged in as <u>{{voter.display_html_big|safe}}</u><br /><br />
</form> </form>
<p> <p>
<button class="tiny" onclick="document.location='./view';">cancel</button><br /> <button class="tiny" onclick="document.location='{% url "election@view" election.uuid %}';">cancel</button><br />
<span style="font-size:0.8em;">If you cancel now, your ballot will <em>NOT</em> be recorded.<br /> <span style="font-size:0.8em;">If you cancel now, your ballot will <em>NOT</em> be recorded.<br />
You can start the voting process over again, of course.</span> You can start the voting process over again, of course.</span>
</p> </p>
......
Please provide the voter ID and password you received by email.<br /><br /> Please provide the voter ID and password you received by email.<br /><br />
<form method="post" action="{% url "helios.views.password_voter_login" election.uuid %}" onsubmit="show_waiting()"> <form method="post" action="{% url "election@password-voter-login" election.uuid %}" onsubmit="show_waiting()">
<input type="hidden" name="csrf_token" value="{{csrf_token}}" /> <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
<input type="hidden" name="return_url" value="{{return_url}}" /> <input type="hidden" name="return_url" value="{{return_url}}" />
<input type="hidden" name="cast_ballot" value="{{cast_ballot}}" /> <input type="hidden" name="cast_ballot" value="{{cast_ballot}}" />
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
{% endif %} {% endif %}
<p style="font-size: 1.4em;"> <p style="font-size: 1.4em;">
[ <a href="{% url "helios.views.one_election_view" election.uuid %}">return to election info</a> ] [ <a href="{% url "election@view" election.uuid %}">return to election info</a> ]
</p> </p>
{% endblock %} {% endblock %}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block title %}{{cast_vote.vote_tinyhash}} &mdash; {{election.name}}{% endblock %} {% block title %}{{cast_vote.vote_tinyhash}} &mdash; {{election.name}}{% endblock %}
{% block content %} {% block content %}
<h2 class="title">Cast Vote {{cast_vote.vote_tinyhash}}</h2> <h2 class="title">Cast Vote {{cast_vote.vote_tinyhash}}</h2>
cast in <a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a><br /> cast in <a href="{% url "election@view" election.uuid %}">{{election.name}}</a><br />
Fingerprint: <tt>{{cast_vote.vote_hash}}</tt><br /> Fingerprint: <tt>{{cast_vote.vote_hash}}</tt><br />
by <b><u> by <b><u>
{% if the_voter.alias %} {% if the_voter.alias %}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block title %}Compute Tally &mdash; {{election.name}}{% endblock %} {% block title %}Compute Tally &mdash; {{election.name}}{% endblock %}
{% block content %} {% block content %}
<h2 class="title">{{election.name}} &mdash; Compute Tally <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">cancel</a>]</span></h2> <h2 class="title">{{election.name}} &mdash; Compute Tally <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">cancel</a>]</span></h2>
<p> <p>
You are about to compute the tally for this election. You only will then see the results. You are about to compute the tally for this election. You only will then see the results.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block title %}Audited Ballots for {{election.name}}{% endblock %} {% block title %}Audited Ballots for {{election.name}}{% endblock %}
{% block content %} {% block content %}
<h2 class="title">{{election.name}} &mdash; Audited Ballots <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election_uuid=election.uuid %}">back to election</a>]</span></h2> <h2 class="title">{{election.name}} &mdash; Audited Ballots <span style="font-size:0.7em;">[<a href="{% url "election@view" election_uuid=election.uuid %}">back to election</a>]</span></h2>
<p> <p>
When you prepare a ballot with Helios, you immediately receive a smart ballot tracker. Before you choose to cast that ballot, you have the option to ask Helios to "break open" that encrypted ballot and verify that Helios encrypted your ballot correctly. Once that's done, you can post that opened ballot here, on the audited ballots' list, for everyone to verify (your identity is not included). Once you've done this, you have to re-encrypt your choices and obtain a different smart ballot tracker. This helps reduce the chance that someone might coerce you to vote differently from your true choice. When you prepare a ballot with Helios, you immediately receive a smart ballot tracker. Before you choose to cast that ballot, you have the option to ask Helios to "break open" that encrypted ballot and verify that Helios encrypted your ballot correctly. Once that's done, you can post that opened ballot here, on the audited ballots' list, for everyone to verify (your identity is not included). Once you've done this, you have to re-encrypt your choices and obtain a different smart ballot tracker. This helps reduce the chance that someone might coerce you to vote differently from your true choice.
...@@ -14,7 +14,7 @@ These ballots are <em>not cast</em>, and they will not be counted. They are just ...@@ -14,7 +14,7 @@ These ballots are <em>not cast</em>, and they will not be counted. They are just
</p> </p>
<p> <p>
To verify an audited ballot, copy its entire content and paste it in the <a target="_new" href="/booth/single-ballot-verify.html?election_url={% url "helios.views.one_election" election.uuid %}">single ballot verifier</a>. To verify an audited ballot, copy its entire content and paste it in the <a target="_new" href="/booth/single-ballot-verify.html?election_url={% url "election@home" election.uuid %}">single ballot verifier</a>.
</p> </p>
{% if audited_ballots %} {% if audited_ballots %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block title %}Ballot Tracking Center for {{election.name}}{% endblock %} {% block title %}Ballot Tracking Center for {{election.name}}{% endblock %}
{% block content %} {% block content %}
<h2 class="title">{{election.name}} &mdash; Ballot Tracking Center <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election_uuid=election.uuid %}">back to election</a>]</span></h2> <h2 class="title">{{election.name}} &mdash; Ballot Tracking Center <span style="font-size:0.7em;">[<a href="{% url "election@view" election_uuid=election.uuid %}">back to election</a>]</span></h2>
<p> <p>
This is the ballot tracking center, which displays the tracking numbers of all cast ballots in this election. This is the ballot tracking center, which displays the tracking numbers of all cast ballots in this election.
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
Voters {{offset_plus_one}} - {{offset_plus_limit}} &nbsp;&nbsp; Voters {{offset_plus_one}} - {{offset_plus_limit}} &nbsp;&nbsp;
{% if next_after %} {% if next_after %}
<a href="./bboard?after={{next_after}}&offset={{offset_plus_limit}}">next {{limit}}</a> &nbsp;&nbsp; <a href="{% url "election@bboard" election.uuid %}?after={{next_after}}&offset={{offset_plus_limit}}">next {{limit}}</a> &nbsp;&nbsp;
{% endif %} {% endif %}
{% ifequal offset 0 %} {% ifequal offset 0 %}
{% else %} {% else %}
<a href="./bboard">back to start</a> &nbsp;&nbsp; <a href="{% url "election@bboard" election.uuid %}">back to start</a> &nbsp;&nbsp;
{% endifequal %} {% endifequal %}
{% if more_p %} {% if more_p %}
<a href="./bboard?after={{next_after}}&offset={{next_offset}}">next {{limit}}</a> <a href="{% url "election@bboard" election.uuid %}?after={{next_after}}&offset={{next_offset}}">next {{limit}}</a>
{% endif %} {% endif %}
<table class="pretty"> <table class="pretty">
<tr><th> <tr><th>
...@@ -40,7 +40,7 @@ Name ...@@ -40,7 +40,7 @@ Name
{{voter.alias}} {{voter.alias}}
{% else %} {% else %}
<img border="0" height="20" src="/static/auth/login-icons/{{voter.voter_type}}.png" alt="{{voter.voter_type}}" /> {% if voter.name %}{{voter.name}}{% else %}{{voter.voter_id}}{% endif %} <img border="0" height="20" src="/static/auth/login-icons/{{voter.voter_type}}.png" alt="{{voter.voter_type}}" /> {% if voter.name %}{{voter.name}}{% else %}{{voter.voter_id}}{% endif %}
{% endif %}</td><td><tt style="font-size: 1.4em;;">{% if voter.vote_hash %}{{voter.vote_hash}} <span style="font-size:0.8em;">[<a href="{% url "helios.views.voter_last_vote" election_uuid=election.uuid voter_uuid=voter.uuid %}">view</a>]</span>{% else %}&mdash;{% endif %}</tt></td></tr> {% endif %}</td><td><tt style="font-size: 1.4em;;">{% if voter.vote_hash %}{{voter.vote_hash}} <span style="font-size:0.8em;">[<a href="{% url "election@ballots@voter@last" election_uuid=election.uuid voter_uuid=voter.uuid %}">view</a>]</span>{% else %}&mdash;{% endif %}</tt></td></tr>
{% endfor %} {% endfor %}
</table> </table>
......
{% extends "helios/templates/cryptobase.html" %} {% extends "helios/templates/cryptobase.html" %}
{% block content %} {% block content %}
<h2 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2> <h2 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">back to election</a>]</span></h2>
<script language="javascript"> <script language="javascript">
{% if election.questions %} {% if election.questions %}
......
...@@ -73,7 +73,7 @@ requires election-specific credentials. ...@@ -73,7 +73,7 @@ requires election-specific credentials.
{% endif %} {% endif %}
</b><br /></p> </b><br /></p>
<p> <p>
[<a href="{% url "helios.views.one_election_view" election.uuid %}">return to the main election page</a>] [<a href="{% url "election@view" election.uuid %}">return to the main election page</a>]
</p> </p>
{% else %} {% else %}
<p> <p>
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
<input type="hidden" name="csrf_token" value="{{csrf_token}}" /> <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
<input class="button" type="submit" value="compute encrypted tally!" /> <input class="button" type="submit" value="compute encrypted tally!" />
<button onclick="document.location='./view'; return false;">never mind</button> <button onclick="document.location='{% url "election@view" election.uuid %}'; return false;">never mind</button>
</form> </form>
{% else %} {% else %}
<p> <p>
No votes have been cast in this election. At least one vote must be cast before you compute the tally.<br /><br /> No votes have been cast in this election. At least one vote must be cast before you compute the tally.<br /><br />
<a href="./view">back to election</a> <a href="{% url "election@view" election.uuid %}">back to election</a>
</p> </p>
{% endif %} {% endif %}
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<h2 class="title">{{election.name}} &mdash; Update <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">cancel</a>]</span></h2> <h2 class="title">{{election.name}} &mdash; Update <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">cancel</a>]</span></h2>
{% if error %} {% if error %}
<p style="color: red;"> <p style="color: red;">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<h2 class="title">{{election.name}} &mdash; Extend Voting <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">cancel</a>]</span></h2> <h2 class="title">{{election.name}} &mdash; Extend Voting <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">cancel</a>]</span></h2>
<form class="prettyform" action="" method="POST" id="edit_election_form"> <form class="prettyform" action="" method="POST" id="edit_election_form">
<input type="hidden" name="csrf_token" value="{{csrf_token}}" /> <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
......
...@@ -29,14 +29,14 @@ You must freeze the ballot before you can contact voters. ...@@ -29,14 +29,14 @@ You must freeze the ballot before you can contact voters.
<li>{{issue.action}}</li> <li>{{issue.action}}</li>
{% endfor %} {% endfor %}
</ul> </ul>
<a href="{% url "helios.views.one_election_view" election.uuid %}">go back to the election</a> <a href="{% url "election@view" election.uuid %}">go back to the election</a>
</p> </p>
{% else %} {% else %}
<form method="post" action=""> <form method="post" action="">
<input type="hidden" name="csrf_token" value="{{csrf_token}}" /> <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
<input class="button" type="submit" value="Freeze the ballot" /> <input class="button" type="submit" value="Freeze the ballot" />
<button onclick="document.location='./view'; return false;">never mind</button> <button onclick="document.location='{% url "election@view" election.uuid %}'; return false;">never mind</button>
</form> </form>
{% endif %} {% endif %}
......
...@@ -35,7 +35,7 @@ $(document).ready(function() { ...@@ -35,7 +35,7 @@ $(document).ready(function() {
$('#generator').hide(); $('#generator').hide();
// get some more server-side randomness for keygen // get some more server-side randomness for keygen
$.getJSON('../../get-randomness', function(result) { $.getJSON('{% url "election@get-randomness" election.uuid %}', function(result) {
sjcl.random.addEntropy(result.randomness); sjcl.random.addEntropy(result.randomness);
BigInt.setup(function() { BigInt.setup(function() {
ELGAMAL_PARAMS = ElGamal.Params.fromJSONObject({{eg_params_json|safe}}); ELGAMAL_PARAMS = ElGamal.Params.fromJSONObject({{eg_params_json|safe}});
...@@ -159,7 +159,7 @@ Your key has been generated, but you may choose to<br /><a href="javascript:clea ...@@ -159,7 +159,7 @@ Your key has been generated, but you may choose to<br /><a href="javascript:clea
</p> </p>
</div> </div>
<form method="post" id="pk_form" action="{% url "helios.views.trustee_upload_pk" election.uuid trustee.uuid %}"> <form method="post" id="pk_form" action="{% url "election@trustee@upload-pk" election.uuid trustee.uuid %}">
<h3>Your Public Key</h3> <h3>Your Public Key</h3>
<p> <p>
It's time to upload the public key to the server. It's time to upload the public key to the server.
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
</p> </p>
<p> <p>
<a href="{% url "helios.views.one_election_view" election.uuid %}">back to the election</a> <a href="{% url "election@view" election.uuid %}">back to the election</a>
</p> </p>
{% endblock %} {% endblock %}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block title %}Questions for {{election.name}}{% endblock %} {% block title %}Questions for {{election.name}}{% endblock %}
{% block content %} {% block content %}
<h3 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h3> <h3 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">back to election</a>]</span></h3>
<script language="javascript"> <script language="javascript">
{% if election.questions %} {% if election.questions %}
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
You are <em>not</em> registered for this election. You are <em>not</em> registered for this election.
</p> </p>
<form method="post" action="{% url "helios.views.one_election_register" election.uuid %}"> <form method="post" action="{% url "election@register" election.uuid %}">
<input type="submit" value="register!" /> <input type="submit" value="register!" />
</form> </form>
{% endif %} {% endif %}
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
</p> </p>
<p> <p>
<a href="{% url "helios.views.one_election_view" election.uuid %}">view the election tally</a> <a href="{% url "election@view" election.uuid %}">view the election tally</a>
</p> </p>
{% endblock %} {% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment