Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated UI for min passcode length #60

Merged
merged 1 commit into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ APP_URL=http://localhost
APP_PORT=5000
APP_HOST=localhost
APP_CONNECT=http
MIN_PASSCODE_LENGTH=

DB_CONNECTION=mysql
DB_HOST=localhost
Expand All @@ -25,4 +26,4 @@ GITHUB_REDIRECT=/oauth/github/callback
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

MIN_PASSCODE_LENGTH=

1 change: 1 addition & 0 deletions elekto/controllers/elections.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def elections_voting_page(eid):
election=election.get(),
candidates=candidates,
voters=voters,
min_passcode_len=APP.config.get('PASSCODE_LENGTH')
)


Expand Down
2 changes: 1 addition & 1 deletion elekto/templates/views/elections/vote.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h6 class="title mt-5px pb-0 mb-0">
<div class="mt-2rem pt-2rem row">
<div class="col-md-6 text-justify">
<small>
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.
If you wish to be able to revoke this ballot, please enter a passphrase of minimum {{ min_passcode_len }} characters here. If you do not enter a passphrase, you will not be able to change or delete your vote later.
</small>
</div>
<div class="col-md-6 pt-5px">
Expand Down