From e82eca3a193c33078a6dab0fc98005603a75c817 Mon Sep 17 00:00:00 2001
From: Josh Berkus
Date: Mon, 18 Oct 2021 17:43:55 -0700
Subject: [PATCH 1/2] Change workflow for revoking ballots.
Signed-off-by: Josh Berkus
---
elekto/controllers/elections.py | 2 +-
elekto/templates/views/elections/single.html | 2 +-
elekto/templates/views/elections/vote.html | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/elekto/controllers/elections.py b/elekto/controllers/elections.py
index a1f779f..32e2215 100644
--- a/elekto/controllers/elections.py
+++ b/elekto/controllers/elections.py
@@ -151,7 +151,7 @@ def elections_edit(eid):
SESSION.commit()
F.flash('The old ballot is sucessfully deleted, please re-cast the ballot.')
- return F.redirect(F.url_for('elections_voting_page', eid=eid))
+ return F.redirect(F.url_for('elections_single', eid=eid))
@APP.route('/app/elections//confirmation', methods=['GET'])
diff --git a/elekto/templates/views/elections/single.html b/elekto/templates/views/elections/single.html
index 2447fa6..c08a7b7 100644
--- a/elekto/templates/views/elections/single.html
+++ b/elekto/templates/views/elections/single.html
@@ -83,7 +83,7 @@
diff --git a/elekto/templates/views/elections/vote.html b/elekto/templates/views/elections/vote.html
index 9d1dfbe..86fdf04 100644
--- a/elekto/templates/views/elections/vote.html
+++ b/elekto/templates/views/elections/vote.html
@@ -22,11 +22,11 @@
{{ election['status'] }}
- Only the {% if election['no_winners'] > 1 %} {{ election['no_winners']}} {% else %} single {% endif %} favorite chocie{% if election['no_winners'] > 1 %}s {% endif %} will win the election.
+ Only the {% if election['no_winners'] > 1 %} {{ election['no_winners']}} {% else %} single {% endif %} preferred candidate{% if election['no_winners'] > 1 %}s {% endif %} will win the election.
The poll ends at {{ election['end_datetime'] }} UTC. Contact the poll supervisor{% if election['election_officers'] | length > 1 %}s{% endif %} if you need help.
- Note: A lower rank indicates a higher preference and "No opinion" does not indicate the lowest preference; it means you do not choose to rank this choice with respect to other choices.
+ Note: Rank your most preferred candidate as "1" and less preferred candidates with higher numbers. "No opinion" does not indicate the lowest preference; it means you do not choose to rank this choice with respect to other choices.
From ef0e874ab1af63db356986edf09c7f1fe5c09f66 Mon Sep 17 00:00:00 2001
From: Josh Berkus
Date: Mon, 18 Oct 2021 17:53:25 -0700
Subject: [PATCH 2/2] Add some more wording changes around revokation.
Signed-off-by: Josh Berkus
---
elekto/templates/views/elections/single.html | 11 ++++++++---
elekto/templates/views/elections/vote.html | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/elekto/templates/views/elections/single.html b/elekto/templates/views/elections/single.html
index c08a7b7..84d2263 100644
--- a/elekto/templates/views/elections/single.html
+++ b/elekto/templates/views/elections/single.html
@@ -57,15 +57,20 @@
{% endfor %}
- The poll starts from {{ election['start_datetime'] }} UTC and ends at
+ {% if election['status'] == 'running' and g.user.username in voters['eligible_voters'] %}
+ {% if g.user.id in voted %}
+ You have cast your vote.
+ {% else %}
+ You have not yet voted in this election.
+ {% endif %}
+ {% endif %}
+ Voting starts at {{ election['start_datetime'] }} UTC and ends at
{{ election['end_datetime'] }} UTC.
-
{% if g.user.username not in voters['eligible_voters'] %}
If you wish to participate in the election, please fill the
exception form
before {{ election['exception_due'] }}.
{% endif %}
-
diff --git a/elekto/templates/views/elections/vote.html b/elekto/templates/views/elections/vote.html
index 86fdf04..7b26e9c 100644
--- a/elekto/templates/views/elections/vote.html
+++ b/elekto/templates/views/elections/vote.html
@@ -61,7 +61,7 @@
- If you wish to be able to re-cast this ballot, please enter a passphrase here. If you do not enter a passphrase, you will not be able to change your vote later.
+ If you wish to be able to revoke this ballot, please enter a passphrase here. If you do not enter a passphrase, you will not be able to change or delete your vote later.