From a342867d3f86096d53a59b0e09d6ac6121bfaa6f Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 5 Sep 2014 23:32:07 -0700 Subject: Added instructions for setting up captcha in an obviously named file. --- webclient/login/register-controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'webclient/login/register-controller.js') diff --git a/webclient/login/register-controller.js b/webclient/login/register-controller.js index 1ab50888df..b3c0c21335 100644 --- a/webclient/login/register-controller.js +++ b/webclient/login/register-controller.js @@ -19,7 +19,11 @@ angular.module('RegisterController', ['matrixService']) function($scope, $rootScope, $location, matrixService, eventStreamService) { 'use strict'; + var config = window.webClientConfig; var useCaptcha = true; + if (config !== undefined) { + useCaptcha = config.useCaptcha; + } // FIXME: factor out duplication with login-controller.js @@ -132,6 +136,10 @@ angular.module('RegisterController', ['matrixService']) else if (error.data.errcode == "M_CAPTCHA_INVALID") { $scope.feedback = "Failed captcha."; } + else if (error.data.errcode == "M_CAPTCHA_NEEDED") { + $scope.feedback = "Captcha is required on this home " + + "server."; + } } else if (error.status === 0) { $scope.feedback = "Unable to talk to the server."; -- cgit 1.4.1