From: Art Cancro Date: Thu, 1 Dec 2011 20:16:24 +0000 (-0500) Subject: Support Google and Yahoo login without the user needing to know that OpenID is in... X-Git-Tag: v8.03~10 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a2fb451e089f86df518870ef2f05a75df1caee61 Support Google and Yahoo login without the user needing to know that OpenID is in use. --- diff --git a/webcit/static/authmethods.js b/webcit/static/authmethods.js index 3362a5185..85e9626db 100644 --- a/webcit/static/authmethods.js +++ b/webcit/static/authmethods.js @@ -58,6 +58,8 @@ function authtoggle(show_which_div) { $('authbox_userpass').style.display = 'none'; $('authbox_newuser').style.display = 'none'; $('authbox_openid').style.display = 'none'; + $('authbox_google').style.display = 'none'; + $('authbox_yahoo').style.display = 'none'; $(show_which_div).style.display = 'block'; } @@ -182,3 +184,27 @@ function openid_onkeypress(e) { } +/****************** GOOGLE ***********************/ + +/* + * Attempt login with Google, called from modal dialog + */ +function ajax_try_google() { + $('login_errmsg').innerHTML = ""; + openid_url = encodeURI("https://www.google.com/accounts/o8/id"); + do_auth_popout("openid_login?openid_url=" + openid_url); +} + + +/****************** GOOGLE ***********************/ + +/* + * Attempt login with Google, called from modal dialog + */ +function ajax_try_yahoo() { + $('login_errmsg').innerHTML = ""; + openid_url = encodeURI("http://yahoo.com"); + do_auth_popout("openid_login?openid_url=" + openid_url); +} + + diff --git a/webcit/static/t/get_logged_in.html b/webcit/static/t/get_logged_in.html index c2e7b89ed..95f49d2f9 100644 --- a/webcit/static/t/get_logged_in.html +++ b/webcit/static/t/get_logged_in.html @@ -23,13 +23,18 @@ OpenID + - -
  • -
  • +
  • + + Google +
  • -
  • -
  • +
  • + + Yahoo + +
  • @@ -78,6 +83,16 @@
    + + + +