Skip to content
Snippets Groups Projects
Commit 8af82e56 authored by Ben Adida's avatar Ben Adida Committed by GitHub
Browse files

Merge pull request #165 from benadida/benadida/small-fixes-2017-05

Benadida/small fixes 2017 05
parents c69f6380 a5fc0996
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ You may tweak the subject and add a custom message using the form below.
{{email_form.as_table}}
</table>
<div>
<label for="">&nbsp;</label><input type="submit" value="Send" id="send_button" />
<label for="">&nbsp;</label><input type="submit" value="Send" id="send_button" class="button" />
</div>
</form>
......
......@@ -125,7 +125,9 @@ Voters {{voters_page.start_index}} - {{voters_page.end_index}} (of {{total_voter
{% if admin_p or not election.use_voter_aliases %}
<td>
{% if admin_p %}
{% if election.frozen_at %}
[<a href="{% url "helios.views.voters_email" election.uuid %}?voter_id={{voter.voter_login_id}}">email</a>]
{% endif %}
[<a onclick="return confirm('are you sure you want to remove {{voter.name}} ?');" href="{% url "helios.views.voter_delete" election.uuid voter.uuid %}">x</a>]
{% endif %}
<img class="small-logo" src="/static/auth/login-icons/{{voter.voter_type}}.png" alt="{{voter.voter_type}}" /> {{voter.name}}</td>
......
......@@ -598,6 +598,14 @@ def password_voter_login(request, election):
})
return HttpResponseRedirect(settings.SECURE_URL_HOST + redirect_url)
else:
# bad form, bad voter login
redirect_url = login_url + "?" + urllib.urlencode({
'bad_voter_login' : '1',
'return_url' : return_url
})
return HttpResponseRedirect(settings.SECURE_URL_HOST + redirect_url)
return HttpResponseRedirect(settings.SECURE_URL_HOST + return_url)
......@@ -1362,7 +1370,7 @@ def voters_email(request, election):
})
if request.method == "GET":
email_form = forms.EmailVotersForm()
email_form = forms.EmailVotersForm(initial={'subject': election.name, 'body': ' '})
if voter:
email_form.fields['send_to'].widget = email_form.fields['send_to'].hidden_widget()
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment