From d4756bb734b092e11d03641e2fa5a011037b2cb9 Mon Sep 17 00:00:00 2001 From: vince0656 Date: Tue, 17 Jul 2018 09:57:09 +0100 Subject: [PATCH] Added ballot choice UI that allows the user to choose between 2 generated ballots whilst showing the ballot's hash. When the user makes their choice, then the ballot is sent to server --- allauthdemo/polls/views.py | 2 +- allauthdemo/templates/polls/event_vote.html | 10 +- allauthdemo/views.py | 46 +---- static/css/main.css | 19 +- static/js/event_vote.js | 208 +++++++++++++++----- 5 files changed, 190 insertions(+), 95 deletions(-) diff --git a/allauthdemo/polls/views.py b/allauthdemo/polls/views.py index a6c8235..7bc00b9 100755 --- a/allauthdemo/polls/views.py +++ b/allauthdemo/polls/views.py @@ -334,7 +334,7 @@ def event_trustee_decrypt(request, event_id): # TODO: Combine partial decryptions and gen results combine_decryptions_and_tally.delay(event) - messages.add_message(request, messages.SUCCESS, 'Your secret key has been successfully submitted') + messages.add_message(request, messages.SUCCESS, 'Your partial decryptions have been successfully submitted') return HttpResponseRedirect(reverse("user_home")) # Without an access key, the client does not have permission to access this page diff --git a/allauthdemo/templates/polls/event_vote.html b/allauthdemo/templates/polls/event_vote.html index 6fa1c6c..d186ad3 100755 --- a/allauthdemo/templates/polls/event_vote.html +++ b/allauthdemo/templates/polls/event_vote.html @@ -111,9 +111,17 @@