From 0280176ccddb9a1f142ad14a9a8a6e97686b0a4d Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 5 Sep 2014 13:31:47 -0700 Subject: [PATCH] Added basic captcha, not hooked up --- webclient/index.html | 3 ++- webclient/login/register-controller.js | 14 ++++++++++++++ webclient/login/register.html | 6 ++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/webclient/index.html b/webclient/index.html index 91b6bf27be..fe62d95bb8 100644 --- a/webclient/index.html +++ b/webclient/index.html @@ -10,7 +10,8 @@ - + + diff --git a/webclient/login/register-controller.js b/webclient/login/register-controller.js index 5a14964248..1c1f4c42f3 100644 --- a/webclient/login/register-controller.js +++ b/webclient/login/register-controller.js @@ -142,6 +142,20 @@ angular.module('RegisterController', ['matrixService']) } ); }; + + var setupCaptcha = function() { + console.log("Setting up ReCaptcha") + Recaptcha.create("6Le31_kSAAAAAK-54VKccKamtr-MFA_3WS1d_fGV", + "regcaptcha", + { + theme: "red", + callback: Recaptcha.focus_response_field + }); + }; + $scope.init = function() { + setupCaptcha(); + }; + }]); diff --git a/webclient/login/register.html b/webclient/login/register.html index 06a6526b70..a27f9ad4e8 100644 --- a/webclient/login/register.html +++ b/webclient/login/register.html @@ -12,7 +12,6 @@

-
Specifying an email address lets other users find you on Matrix more easily,
and will give you a way to reset your password in the future
@@ -26,7 +25,10 @@

- + + +
+