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

allow hiding of login options

parent 9a48ddcd
Branches
Tags
No related merge requests found
...@@ -92,7 +92,11 @@ ...@@ -92,7 +92,11 @@
{% if voter %} {% if voter %}
You are signed in as voter <u>{% if voter.alias %}{{voter.alias}}{% else %}{{voter.name}}{% endif %}</u> in election <u>{{voter.election.name}}</u>. [<a href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.logout %}?return_url={{CURRENT_URL}}">sign out</a>] You are signed in as voter <u>{% if voter.alias %}{{voter.alias}}{% else %}{{voter.name}}{% endif %}</u> in election <u>{{voter.election.name}}</u>. [<a href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.logout %}?return_url={{CURRENT_URL}}">sign out</a>]
{% else %} {% else %}
{% if settings.SHOW_LOGIN_OPTIONS %}
not logged in. <a class="tiny button" href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.index %}?return_url={{CURRENT_URL}}">log in</a> not logged in. <a class="tiny button" href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.index %}?return_url={{CURRENT_URL}}">log in</a>
{% else %}
powered by <a href="http://heliosvoting.org">Helios Voting</a>.
{% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
<br clear="right" /> <br clear="right" />
......
...@@ -90,10 +90,15 @@ More than <b>100,000 votes</b> have been cast using Helios. ...@@ -90,10 +90,15 @@ More than <b>100,000 votes</b> have been cast using Helios.
<div class="row right"><a class="tiny button" href="{% url helios.views.elections_voted %}">see all</a></div> <div class="row right"><a class="tiny button" href="{% url helios.views.elections_voted %}">see all</a></div>
<div class="row"></div> <div class="row"></div>
{% else %} {% else %}
{% if settings.SHOW_LOGIN_OPTIONS %}
<h5>Log In to Start Voting</h5> <h5>Log In to Start Voting</h5>
{{login_box|safe}} {{login_box|safe}}
{% else %}
<p>
Select an election to start voting. You will be asked for your voting credentials after you complete a ballot.
</p>
{% endif %}
{% endif %} {% endif %}
<br /><br />
</div> </div>
</div> </div>
......
...@@ -20,6 +20,10 @@ MANAGERS = ADMINS ...@@ -20,6 +20,10 @@ MANAGERS = ADMINS
# is this the master Helios web site? # is this the master Helios web site?
MASTER_HELIOS = (get_from_env('MASTER_HELIOS', '0') == '1') MASTER_HELIOS = (get_from_env('MASTER_HELIOS', '0') == '1')
# show ability to log in? (for example, if the site is mostly used by voters)
# if turned off, the admin will need to know to go to /auth/login manually
SHOW_LOGIN_OPTIONS = (get_from_env('SHOW_LOGIN_OPTIONS', '1') == '1')
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment