summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/login.html57
1 files changed, 33 insertions, 24 deletions
diff --git a/hyperkitty/templates/login.html b/hyperkitty/templates/login.html
index 4a27031..fb82c44 100644
--- a/hyperkitty/templates/login.html
+++ b/hyperkitty/templates/login.html
@@ -15,36 +15,45 @@
<h2>Login with your email</h2>
<ul class="social-login inline">
- <li class="browserid">
- <form method="post" action="{% url 'socialauth_complete' "browserid" %}?next={{ next }}">
- {% csrf_token %}
- <input type="hidden" name="assertion" value="" />
- <a rel="nofollow" id="browserid" href="#" class="disabled"><img src="{{ STATIC_URL }}img/login/persona-large-disabled.png" alt="Login using Persona" /></a>
- </form>
- </li>
-
- <li><a title="Google" class="socialaccount_provider google" href="{% url 'socialauth_begin' backend='google' %}?next={{ next }}"><img src="{{ STATIC_URL }}img/login/google.png" alt="Google" /></a></li>
-
- <li><a title="Yahoo" class="socialaccount_provider yahoo" href="{% url 'socialauth_begin' backend='yahoo' %}?next={{ next }}"><img src="{{ STATIC_URL }}img/login/yahoo.png" alt="Yahoo" /></a></li>
-
- <li><a title="Fedora" class="socialaccount_provider fedora" href="{% url 'socialauth_begin' backend='fedora' %}?next={{ next }}"><img src="{{ STATIC_URL }}img/login/fedora.png" alt="Fedora" /></a></li>
-
- <li><a class="socialaccount_provider openid" href="#"><img src="{{ STATIC_URL }}img/login/openid.png" alt="OpenID" /></a>
- <form method="post" action="{% url 'socialauth_begin' "openid" %}?next={{ next }}" class="form-inline openid">
- {% csrf_token %}
- <div class="input-append">
- <input type="text" class="input-large" name="openid_identifier" placeholder="OpenID URL" />
- <button type="submit" class="btn">Login with OpenID</button>
- </div>
- </form>
- </li>
+ {% for backend in backends %}
+ <li class="{{ backend }}">
+ {% if backend == "browserid" %}
+ <form method="post"
+ action="{% url 'socialauth_complete' "browserid" %}?next={{ next }}">
+ {% csrf_token %}
+ <input type="hidden" name="assertion" value="" />
+ <a rel="nofollow" id="browserid" href="#" class="disabled"><img
+ src="{{ STATIC_URL }}img/login/persona-large-disabled.png"
+ alt="Login using Persona" /></a>
+ </form>
+ {% elif backend == "openid" %}
+ <a class="socialaccount_provider openid" title="OpenID" href="#"><img
+ src="{{ STATIC_URL }}img/login/openid.png" alt="OpenID" /></a>
+ <form method="post" class="form-inline openid"
+ action="{% url 'socialauth_begin' "openid" %}?next={{ next }}">
+ {% csrf_token %}
+ <div class="input-append">
+ <input type="text" class="input-large" name="openid_identifier"
+ placeholder="OpenID URL" />
+ <button type="submit" class="btn">Login with OpenID</button>
+ </div>
+ </form>
+ {% else %}
+ <a title="{{ backend|title }}" class="socialaccount_provider {{ backend }}"
+ href="{% url 'socialauth_begin' backend=backend %}?next={{ next }}"><img
+ src="{{ STATIC_URL }}img/login/{{ backend }}.png"
+ alt="{{ backend|title }}" /></a>
+ {% endif %}
+ </li>
+ {% endfor %}
</ul>
{% if use_internal_auth %}
<h2>Login with username and password</h2>
-<form action="{{ request.path }}?next={{ next|urlencode }}" method="post" class="form-horizontal">
+<form action="{{ request.path }}?next={{ next|urlencode }}"
+ method="post" class="form-horizontal">
{% csrf_token %}
{{ form|crispy }}
<div class="control-group">