Added instructions for setting up captcha in an obviously named file.

This commit is contained in:
Kegan Dougal 2014-09-05 23:32:07 -07:00
parent b5749c75d9
commit a342867d3f
3 changed files with 54 additions and 11 deletions

View file

@ -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.";