Merge pull request #2245 from coreos-inc/recaptcha
Add support for recaptcha during the create account flow
This commit is contained in:
commit
9b65b37011
12 changed files with 88 additions and 1 deletions
|
@ -10,4 +10,24 @@
|
|||
|
||||
.signup-form-element input {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.signup-form-element .captcha {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signup-form-element .captcha div {
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.signup-form-element .captcha {
|
||||
height: 0px;
|
||||
transition: height ease-in-out 250ms;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.user-setup-element .captcha.expanded {
|
||||
height: 94px;
|
||||
}
|
|
@ -30,6 +30,10 @@
|
|||
match="newUser.password" required
|
||||
ng-pattern="/^.{8,}$/">
|
||||
|
||||
<div class="captcha" quay-require="['RECAPTCHA']"
|
||||
ng-class="{'expanded': newUser.password == newUser.repeatPassword && newUser.password}">
|
||||
<div vc-recaptcha ng-model="newUser.recaptcha_response" key="Config.RECAPTCHA_SITE_KEY"></div>
|
||||
</div>
|
||||
|
||||
<button id="signupButton"
|
||||
class="btn btn-primary btn-block landing-signup-button" ng-disabled="signupForm.$invalid" type="submit"
|
||||
|
@ -39,6 +43,7 @@
|
|||
</button>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="cor-loader" ng-show="registering"></div>
|
||||
<div class="co-alert co-alert-info" ng-show="awaitingConfirmation && hideRegisteredMessage != 'true'">
|
||||
Thank you for registering! We have sent you an activation email.
|
||||
|
|
|
@ -55,6 +55,10 @@ if (window.__config && window.__config.GOOGLE_ANALYTICS_KEY) {
|
|||
quayDependencies.push('angulartics.google.analytics');
|
||||
}
|
||||
|
||||
if (window.__config && window.__config.RECAPTCHA_SITE_KEY) {
|
||||
quayDependencies.push('vcRecaptcha');
|
||||
}
|
||||
|
||||
// Define the application.
|
||||
quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoadingBarProvider) {
|
||||
cfpLoadingBarProvider.includeSpinner = false;
|
||||
|
|
Reference in a new issue