From 80b20fe877db2a139db6d4a916681f44a8afc928 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 13 May 2013 14:16:33 -0400 Subject: [PATCH] adding alternate logins to register page --- public/templates/login.tpl | 2 +- public/templates/register.tpl | 34 +++++++++++++++++++++++++--------- src/webserver.js | 22 ++++++++++++++++++++++ 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/public/templates/login.tpl b/public/templates/login.tpl index ec2747c468..875e4760bd 100644 --- a/public/templates/login.tpl +++ b/public/templates/login.tpl @@ -23,8 +23,8 @@ \ No newline at end of file diff --git a/src/webserver.js b/src/webserver.js index ac18f782af..7b8b8613d9 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -122,6 +122,28 @@ var express = require('express'), } } + res.send(JSON.stringify(data)); + break; + case 'register' : + var data = {}, + login_strategies = auth.get_login_strategies(), + num_strategies = login_strategies.length; + + if (num_strategies == 0) { + data = { + 'register_window:spansize': 'span12', + 'alternate_logins:display': 'none' + }; + } else { + data = { + 'register_window:spansize': 'span6', + 'alternate_logins:display': 'block' + } + for (var i=0, ii=num_strategies; i