Added basic captcha, not hooked up
parent
1c7bb34ffd
commit
0280176ccd
|
@ -11,6 +11,7 @@
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
|
|
||||||
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
|
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
|
||||||
|
<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
|
||||||
<script src="js/angular.min.js"></script>
|
<script src="js/angular.min.js"></script>
|
||||||
<script src="js/angular-route.min.js"></script>
|
<script src="js/angular-route.min.js"></script>
|
||||||
<script src="js/angular-sanitize.min.js"></script>
|
<script src="js/angular-sanitize.min.js"></script>
|
||||||
|
|
|
@ -143,5 +143,19 @@ 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();
|
||||||
|
};
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<input ng-show="!wait_3pid_code" id="email" size="32" type="text" ng-focus="true" ng-model="account.email" placeholder="Email address (optional)"/>
|
<input ng-show="!wait_3pid_code" id="email" size="32" type="text" ng-focus="true" ng-model="account.email" placeholder="Email address (optional)"/>
|
||||||
<div ng-show="!wait_3pid_code" class="smallPrint">Specifying an email address lets other users find you on Matrix more easily,<br/>
|
<div ng-show="!wait_3pid_code" class="smallPrint">Specifying an email address lets other users find you on Matrix more easily,<br/>
|
||||||
and will give you a way to reset your password in the future</div>
|
and will give you a way to reset your password in the future</div>
|
||||||
|
@ -27,6 +26,9 @@
|
||||||
<br ng-show="!wait_3pid_code" />
|
<br ng-show="!wait_3pid_code" />
|
||||||
<br ng-show="!wait_3pid_code" />
|
<br ng-show="!wait_3pid_code" />
|
||||||
|
|
||||||
|
|
||||||
|
<div id="regcaptcha" ng-init="init()" />
|
||||||
|
|
||||||
<button ng-show="!wait_3pid_code" ng-click="register()" ng-disabled="!account.desired_user_id || !account.homeserver || !account.pwd1 || !account.pwd2 || account.pwd1 !== account.pwd2">Sign up</button>
|
<button ng-show="!wait_3pid_code" ng-click="register()" ng-disabled="!account.desired_user_id || !account.homeserver || !account.pwd1 || !account.pwd2 || account.pwd1 !== account.pwd2">Sign up</button>
|
||||||
|
|
||||||
<div ng-show="wait_3pid_code">
|
<div ng-show="wait_3pid_code">
|
||||||
|
|
Loading…
Reference in New Issue