[Ivan Diaz] - Add recaptcha

This commit is contained in:
Ivan Diaz 2015-10-17 16:58:25 -03:00
parent c78745ee96
commit 645c9b666e
6 changed files with 17 additions and 4 deletions

View File

@ -50,6 +50,7 @@
"morgan": "^1.6.1", "morgan": "^1.6.1",
"react": "^0.13.x", "react": "^0.13.x",
"react-document-title": "^1.0.2", "react-document-title": "^1.0.2",
"react-google-recaptcha": "^0.4.0",
"react-motion": "^0.3.0", "react-motion": "^0.3.0",
"react-router": "^1.0.0-rc1", "react-router": "^1.0.0-rc1",
"reflux": "^0.2.9", "reflux": "^0.2.9",

View File

@ -16,6 +16,6 @@
} }
&--forgot-password { &--forgot-password {
margin-top: 20px; margin-top: 20px;
} }
} }

View File

@ -1,5 +1,6 @@
import React from 'react/addons'; import React from 'react/addons';
import {ListenerMixin} from 'reflux'; import {ListenerMixin} from 'reflux';
import ReCAPTCHA from 'react-google-recaptcha';
import UserActions from 'actions/user-actions'; import UserActions from 'actions/user-actions';
import UserStore from 'stores/user-store'; import UserStore from 'stores/user-store';
@ -24,6 +25,9 @@ var MainSignUpPageWidget = React.createClass({
<Input {...this.getInputProps()} label="Password" name="password" password/> <Input {...this.getInputProps()} label="Password" name="password" password/>
<Input {...this.getInputProps()} label="Repeat Password" name="repeated-password" password/> <Input {...this.getInputProps()} label="Repeat Password" name="repeated-password" password/>
</div> </div>
<div className="signup-widget--captcha">
<ReCAPTCHA sitekey="6LeSP-8SAAAAABFCFiNhSz19syuGI4TspYChe7dX" onChange={function () {}}/>
</div>
<Button type="primary">SIGN UP</Button> <Button type="primary">SIGN UP</Button>
</Form> </Form>
</Widget> </Widget>

View File

@ -1,17 +1,24 @@
.main-signup-page { .main-signup-page {
&--widget-container { &--widget-container {
height: 401px; height: 525px;
} }
.signup-widget { .signup-widget {
padding: 30px;
text-align: center;
&--inputs { &--inputs {
display: inline-block; display: inline-block;
margin: 0 auto 20px; margin: 0 auto;
} }
&--input { &--input {
margin-bottom: 5px; margin-bottom: 5px;
} }
&--captcha {
margin-top: 30px;
margin-bottom: 20px;
}
} }
} }

View File

@ -5,7 +5,7 @@
border-radius: 4px; border-radius: 4px;
text-align: center; text-align: center;
padding: 20px; padding: 20px;
width: 324px; min-width: 324px;
min-height: 327px; min-height: 327px;
&--title { &--title {

View File

@ -9,6 +9,7 @@
<title>App Name</title> <title>App Name</title>
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head> </head>
<body> <body>