Require agreement on signup.
This commit is contained in:
parent
3b76219f18
commit
29f59aa81d
|
@ -19,5 +19,24 @@
|
||||||
&-alert {
|
&-alert {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-legal {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
&-text {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
line-height: 1.2rem;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-form-item-control {
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.PasswordFormItems .ant-row {
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Form, Input, Button, Alert } from 'antd';
|
import { Form, Input, Button, Checkbox, Alert } from 'antd';
|
||||||
import { FormComponentProps } from 'antd/lib/form';
|
import { FormComponentProps } from 'antd/lib/form';
|
||||||
import { authActions } from 'modules/auth';
|
import { authActions } from 'modules/auth';
|
||||||
import { AppState } from 'store/reducers';
|
import { AppState } from 'store/reducers';
|
||||||
import PasswordFormItems from 'components/PasswordFormItems';
|
import PasswordFormItems from 'components/PasswordFormItems';
|
||||||
import './SignUp.less';
|
import './SignUp.less';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
interface StateProps {
|
interface StateProps {
|
||||||
isCreatingUser: AppState['auth']['isCreatingUser'];
|
isCreatingUser: AppState['auth']['isCreatingUser'];
|
||||||
|
@ -67,6 +68,32 @@ class SignUp extends React.Component<Props> {
|
||||||
|
|
||||||
<PasswordFormItems form={this.props.form} />
|
<PasswordFormItems form={this.props.form} />
|
||||||
|
|
||||||
|
<Form.Item className="SignUp-form-legal">
|
||||||
|
{getFieldDecorator('hasAgreed', {
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: 'You must agree to create an account' },
|
||||||
|
],
|
||||||
|
})(
|
||||||
|
<Checkbox name="hasAgreed">
|
||||||
|
<span className="SignUp-form-legal-text">
|
||||||
|
I agree to the{' '}
|
||||||
|
<Link target="_blank" to="/code-of-conduct">
|
||||||
|
code of conduct
|
||||||
|
</Link>
|
||||||
|
,{' '}
|
||||||
|
<Link target="_blank" to="/tos">
|
||||||
|
terms of service
|
||||||
|
</Link>
|
||||||
|
, and{' '}
|
||||||
|
<Link target="_blank" to="/privacy">
|
||||||
|
privacy policy
|
||||||
|
</Link>
|
||||||
|
.
|
||||||
|
</span>
|
||||||
|
</Checkbox>,
|
||||||
|
)}
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
<div className="SignUp-form-controls">
|
<div className="SignUp-form-controls">
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
Loading…
Reference in New Issue