diff --git a/app/gabsocial/features/forms/index.js b/app/gabsocial/features/forms/index.js index c92e2ead6..7cb91cc36 100644 --- a/app/gabsocial/features/forms/index.js +++ b/app/gabsocial/features/forms/index.js @@ -79,16 +79,16 @@ export class SimpleInput extends ImmutablePureComponent { } -export const SimpleForm = ({ children, onSubmit }) => ( -
+export const SimpleForm = ({ children, ...props }) => ( + ); SimpleForm.propTypes = { children: PropTypes.node, - onSubmit: PropTypes.func, }; SimpleForm.defaultProps = { + acceptCharset: 'UTF-8', onSubmit: e => e.preventDefault(), }; diff --git a/app/gabsocial/features/landing_page/components/registration_form.js b/app/gabsocial/features/landing_page/components/registration_form.js index b45719607..21eba9750 100644 --- a/app/gabsocial/features/landing_page/components/registration_form.js +++ b/app/gabsocial/features/landing_page/components/registration_form.js @@ -3,7 +3,12 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; -import { TextInput } from 'gabsocial/features/forms'; +import { + SimpleForm, + SimpleInput, + TextInput, + Checkbox, +} from 'gabsocial/features/forms'; const mapStateToProps = (state, props) => ({ instance: state.get('instance'), @@ -16,12 +21,17 @@ class RegistrationForm extends ImmutablePureComponent { instance: ImmutablePropTypes.map, } + onSubmit = e => { + // TODO: Dispatch action + e.preventDefault(); + } + render() { const { instance } = this.props; return (