diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-04-26 18:06:23 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-04-26 18:06:23 +0200 |
commit | d39e8062f4cfed2fcb84a266c3ef70e6998e92b7 (patch) | |
tree | cc774aae2afc637b31e66d2114d07eabe7f28094 /hyperkitty/templates/login.html | |
parent | 8946c1df1b94e277749f5cc9562a5998e0633d58 (diff) | |
download | hyperkitty-d39e8062f4cfed2fcb84a266c3ef70e6998e92b7.tar.gz hyperkitty-d39e8062f4cfed2fcb84a266c3ef70e6998e92b7.tar.xz hyperkitty-d39e8062f4cfed2fcb84a266c3ef70e6998e92b7.zip |
Enable OpenID login
Diffstat (limited to 'hyperkitty/templates/login.html')
-rw-r--r-- | hyperkitty/templates/login.html | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/hyperkitty/templates/login.html b/hyperkitty/templates/login.html index 3eeee8c..3c3377e 100644 --- a/hyperkitty/templates/login.html +++ b/hyperkitty/templates/login.html @@ -15,16 +15,27 @@ <h2>Login with your email</h2> <ul class="social-login inline"> - <li> + <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' %}"><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' %}"><img src="{{ STATIC_URL }}img/login/yahoo.png" alt="Yahoo"></a></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 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> </ul> @@ -53,6 +64,7 @@ <!-- Setup click handler that receives BrowserID assertion code and sends POST data --> <script type="text/javascript"> $(function() { + // BrowserID $('#browserid').click(function(e) { e.preventDefault(); var self = $(this); @@ -69,6 +81,13 @@ img.attr("src", img.attr("src").replace(/-disabled/, "")); $(this).removeClass("disabled"); }); + // OpenID + $('a.openid').click(function(e) { + e.preventDefault(); + $("form.openid").slideToggle("fast") + .filter(":visible") + .find("input[name='openid_identifier']").focus(); + }); }); </script> <!-- end browserid stuff --> |