Skip to content
Snippets Groups Projects
Unverified Commit df0d2c59 authored by millosolomillo's avatar millosolomillo Committed by GitHub
Browse files

Revert "Update pull from benadida repository. (#3)" (#4)

This reverts commit b52a755d.
parent b52a755d
Branches
No related tags found
No related merge requests found
...@@ -97,7 +97,6 @@ function load_election_and_ballots(election_url) { ...@@ -97,7 +97,6 @@ function load_election_and_ballots(election_url) {
// the hash will be computed within the setup function call now // the hash will be computed within the setup function call now
$.get(election_url, function(raw_json) { $.get(election_url, function(raw_json) {
try {
election = HELIOS.Election.fromJSONString(raw_json); election = HELIOS.Election.fromJSONString(raw_json);
result_append("loaded election: " + election.name); result_append("loaded election: " + election.name);
result_append("election fingerprint: " + election.get_hash()); result_append("election fingerprint: " + election.get_hash());
...@@ -243,12 +242,6 @@ function load_election_and_ballots(election_url) { ...@@ -243,12 +242,6 @@ function load_election_and_ballots(election_url) {
}); });
}); });
} catch (error) {
result_append("<p>It appears that you are trying to verify a private election.</p>");
result_append('<p>You can log in as a valid voter or log in as the election admin.</p>');
result_append('<a class="btn" href="' + election_url + '">Log in as a valid voter </a>');
result_append('<a class="btn" href="/auth/?return_url=/verifier/verify.html?election_url=' + election_url + '">Log in as the election admin</a>');
}
}); });
} }
......
Django==1.8.19 Django==1.8.18
anyjson==0.3.3 anyjson==0.3.3
celery==3.1.18 celery==3.1.18
django-celery==3.1.16 django-celery==3.1.16
...@@ -10,8 +10,8 @@ pyparsing==1.5.7 ...@@ -10,8 +10,8 @@ pyparsing==1.5.7
python-dateutil>=1.5 python-dateutil>=1.5
python-openid==2.2.5 python-openid==2.2.5
wsgiref==0.1.2 wsgiref==0.1.2
gunicorn==19.9 gunicorn==19.3
requests==2.21.0 requests==2.7.0
unicodecsv==0.9.0 unicodecsv==0.9.0
dj_database_url==0.3.0 dj_database_url==0.3.0
django-sslify==0.2.7 django-sslify==0.2.7
......
#!/bin/bash #!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status.
dropdb helios dropdb helios
createdb helios createdb helios
python manage.py syncdb python manage.py syncdb
......
python-2.7.15 python-2.7.10
...@@ -5,7 +5,6 @@ Glue some events together ...@@ -5,7 +5,6 @@ Glue some events together
from django.conf import settings from django.conf import settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.conf import settings from django.conf import settings
from helios.view_utils import render_template_raw
import helios.views, helios.signals import helios.views, helios.signals
import views import views
...@@ -13,18 +12,30 @@ import views ...@@ -13,18 +12,30 @@ import views
def vote_cast_send_message(user, voter, election, cast_vote, **kwargs): def vote_cast_send_message(user, voter, election, cast_vote, **kwargs):
## FIXME: this doesn't work for voters that are not also users ## FIXME: this doesn't work for voters that are not also users
# prepare the message # prepare the message
subject_template = 'email/cast_vote_subject.txt' subject = "%s - vote cast" % election.name
body_template = 'email/cast_vote_body.txt'
body = """
extra_vars = { You have successfully cast a vote in
'election' : election,
'voter': voter, %s
'cast_vote': cast_vote,
'cast_vote_url': helios.views.get_castvote_url(cast_vote), Your ballot is archived at:
'custom_subject' : "%s - vote cast" % election.name
} %s
subject = render_template_raw(None, subject_template, extra_vars) """ % (election.name, helios.views.get_castvote_url(cast_vote))
body = render_template_raw(None, body_template, extra_vars)
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 # send it via the notification system associated with the auth system
user.send_message(subject, body) user.send_message(subject, body)
......
...@@ -7,7 +7,7 @@ form.prettyform label,input,textarea,select { ...@@ -7,7 +7,7 @@ form.prettyform label,input,textarea,select {
line-height: 1.8; line-height: 1.8;
} }
form.prettyform label:not(.answer) { form.prettyform label {
display: block; display: block;
text-align: right; text-align: right;
float: left; float: left;
......
Dear {{voter.name}},
You have successfully cast a vote in {{election.name}}.
Your ballot is archived at: {{cast_vote_url}}
{% if election.use_voter_aliases %}
This election uses voter aliases to protect your privacy.
Your voter alias is: {{voter.alias}}.
{% endif %}
--
Helios
{{custom_subject|safe}}
...@@ -24,7 +24,7 @@ Helios elections are: ...@@ -24,7 +24,7 @@ Helios elections are:
</ul> </ul>
<p> <p>
More than <b>2,000,000 votes</b> have been cast using Helios. More than <b>100,000 votes</b> have been cast using Helios.
</p> </p>
{% if create_p %} {% if create_p %}
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.conf.urls import patterns from django.conf.urls import *
from views import home, about, docs, faq, privacy from views import *
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^$', home), (r'^$', home),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment