diff --git a/helios b/helios index 58dbb348771a05d4a5d07f990b44f9ed98514c5d..609753a5117ceb5d3b39b8dff9e97270a17f5a2d 160000 --- a/helios +++ b/helios @@ -1 +1 @@ -Subproject commit 58dbb348771a05d4a5d07f990b44f9ed98514c5d +Subproject commit 609753a5117ceb5d3b39b8dff9e97270a17f5a2d diff --git a/server-ui/glue.py b/server-ui/glue.py index 89cc38ba052cf7cd82a8616c47baf3767c70cd7d..1af91cd453c45e4cb2cdf2117dd5fde35a0e5b36 100644 --- a/server-ui/glue.py +++ b/server-ui/glue.py @@ -4,12 +4,40 @@ Glue some events together from django.conf import settings from django.core.urlresolvers import reverse +from django.conf import settings import helios.views, helios.signals import views -def vote_cast_update_status(user, election, cast_vote, **kwargs): - pass +def vote_cast_update_status(user, voter, election, cast_vote, **kwargs): + # prepare the message + subject = "%s - vote cast" % election.name + + body = """ +You have successfully cast a vote in + + %s + +Your ballot tracking number is: + + %s +""" % (election.name, cast_vote.vote_hash + + if election.use_voter_aliases: + body += """ + +This election uses voter aliases to protect your privacy. +Your voter alias is : %s +""" % voter.alias + + body += """ + +-- +%s +""" % settings.SITE_TITLE + + # send it via the notification system associated with the auth system + user.send_message(subject, body) helios.signals.vote_cast.connect(vote_cast_update_status) diff --git a/server-ui/templates/index.html b/server-ui/templates/index.html index 7b866ecb8a18eee93c582b8ca966c32f048cee5e..e0f4549946094eff4fe3351d021505a2f894ba8c 100644 --- a/server-ui/templates/index.html +++ b/server-ui/templates/index.html @@ -11,17 +11,18 @@ Welcome to the {{settings.SITE_TITLE}} system! </p> +<!-- <p> Helios is a revolutionary voting system that empowers voters to verify that their votes were correctly tallied.<br /> Learn more about Helios, and why secure voting matters, <a href="http://heliosvoting.org">here</a>. </p> - +--> <p style="font-size: 1.4em;"> Current Elections: <ul> {% for election in elections %} - <li> <a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></li> + <li> <a href="{% url helios.views.election_shortcut election.short_name %}">{{election.name}}</a></li> {% endfor %} </ul> </p> diff --git a/server-ui/views.py b/server-ui/views.py index b8da4e0078a8e4f044d032942053af81807ee4bf..24908eea307b852745af2d86a9ba8d8703ff705c 100644 --- a/server-ui/views.py +++ b/server-ui/views.py @@ -22,7 +22,7 @@ def get_election(): def home(request): # load the featured elections - featured_elections = [Election.get_by_key_name(uuid) for uuid in settings.FEATURED_ELECTION_UUIDS] + featured_elections = [Election.get_by_short_name(short_name) for short_name in settings.FEATURED_ELECTIONS] featured_elections = [e for e in featured_elections if e != None] return render_template(request, "index", {'elections': featured_elections})