Skip to content
Snippets Groups Projects
Commit ca380aa7 authored by Ben Adida's avatar Ben Adida
Browse files

fixed email templates

parent 647193c8
Branches
No related tags found
No related merge requests found
...@@ -9,14 +9,13 @@ Your username: {{voter.user.user_id}} ...@@ -9,14 +9,13 @@ Your username: {{voter.user.user_id}}
Your password: {{voter.user.info.password}} Your password: {{voter.user.info.password}}
{% else %} {% else %}
Log in with your {{voter.voter_type}} account. Log in with your {{voter.voter_type}} account.
{% endifequal %} {% endifequal %}{% if election.use_voter_aliases %}
{% if election.use_voter_aliases %}
Your voter alias: {{voter.alias}}
In order to protect your privacy, this election is configured In order to protect your privacy, this election is configured
to never display your username, name, or email address to the public. to never display your username, name, or email address to the public.
Instead, the ballot tracking center will only display your alias. Instead, the ballot tracking center will only display your alias.
Your voter alias is {{voter.alias}}.
IMPORTANTLY, when you are prompted to log in to vote, IMPORTANTLY, when you are prompted to log in to vote,
please use your *username*, not your alias. please use your *username*, not your alias.
{% endif %} {% endif %}
......
vote in {{voter.election.name}} {{voter.election.name}} - {{custom_subject|safe}}
...@@ -24,6 +24,11 @@ voter_id = '{{voter.voter_id}}'; ...@@ -24,6 +24,11 @@ voter_id = '{{voter.voter_id}}';
the election URL, the login information, and a simple email signature.<br /> the election URL, the login information, and a simple email signature.<br />
No need to include these in the body of your email below. No need to include these in the body of your email below.
</p> </p>
<p>
The email will also <b><u>automatically</u></b> include the name of the election in the subject,<br />followed by your custom subject.
</p>
<form class="prettyform" action="" method="POST" id="email_form"> <form class="prettyform" action="" method="POST" id="email_form">
<input type="hidden" name="csrf_token" value="{{csrf_token}}" /> <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
<table class="pretty"> <table class="pretty">
......
...@@ -916,8 +916,10 @@ def voters_email(request, election): ...@@ -916,8 +916,10 @@ def voters_email(request, election):
body_template = 'email/vote_body.txt' body_template = 'email/vote_body.txt'
extra_vars = { extra_vars = {
'custom_subject' : email_form.cleaned_data['subject'],
'custom_message' : email_form.cleaned_data['body'], 'custom_message' : email_form.cleaned_data['body'],
'election_url' : get_election_url(election) 'election_url' : get_election_url(election),
'election' : election
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment