<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { Field, reduxForm } from 'redux-form';
import { TextField } from 'redux-form-material-ui';
import RaisedButton from 'material-ui/RaisedButton';
import { SIGNUP_FORM_NAME } from '../../../../constants';
import { required, validateEmail } from '../../../../utils/form';
import classes from './SignupForm.scss';


const SignupForm = ({ pristine, submitting, handleSubmit }) => (
    <form className={classes.container} onSubmit={handleSubmit}>
        <Field
            name='username'
            component={TextField}
            floatingLabelText='Username'
            validate={required}
        />
        <Field
            name='email'
            component={TextField}
            floatingLabelText='Email'
            validate={[required, validateEmail]}
        />
        <Field
            name='password'
            component={TextField}
            floatingLabelText='Password'
            type='password'
            validate={required}
        />
        <div className={classes.submit}>
            <RaisedButton
                label='Signup'
                primary
                type='submit'
                disabled={pristine || submitting}
            />
        </div>
    </form>
);
SignupForm.propTypes = {
    pristine: PropTypes.bool.isRequired, // added by redux-form
    submitting: PropTypes.bool.isRequired, // added by redux-form
    handleSubmit: PropTypes.func.isRequired // added by redux-form
};
export default reduxForm({
    form: SIGNUP_FORM_NAME
})(SignupForm);<commit_msg>added Radio Buttons to the sign up form to distingush users. In order to develop user roles in app.<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import { Field, reduxForm } from 'redux-form'
import {
  TextField,
  RadioButtonGroup,
  RadioButton
} from 'redux-form-material-ui'
import RaisedButton from 'material-ui/RaisedButton'
import { SIGNUP_FORM_NAME } from '../../../../constants'
import { required, validateEmail } from '../../../../utils/form'
import classes from './SignupForm.scss'

const renderRadioGroup = ({ input, ...rest }) => (
  <RadioButtonGroup
    {...input}
    {...rest}
    valueSelected={input.value}
    onChange={(event, value) => input.onChange(value)}
  />
)

const SignupForm = ({ pristine, submitting, handleSubmit }) => (
  <form className={classes.container} onSubmit={handleSubmit}>
    <Field name="userType" component={renderRadioGroup}>
      <RadioButton value="developer" label="Developer" />
      <RadioButton value="employer" label="Employer" />
    </Field>
    <Field
      name="username"
      component={TextField}
      floatingLabelText="Username"
      validate={required}
    />
    <Field
      name="email"
      component={TextField}
      floatingLabelText="Email"
      validate={[required, validateEmail]}
    />
    <Field
      name="password"
      component={TextField}
      floatingLabelText="Password"
      type="password"
      validate={required}
    />
    <div className={classes.submit}>
      <RaisedButton
        label="Signup"
        primary
        type="submit"
        disabled={pristine || submitting}
      />
    </div>
  </form>
)
SignupForm.propTypes = {
  pristine: PropTypes.bool.isRequired, // added by redux-form
  submitting: PropTypes.bool.isRequired, // added by redux-form
  handleSubmit: PropTypes.func.isRequired // added by redux-form
}
export default reduxForm({
  form: SIGNUP_FORM_NAME
})(SignupForm)
{'fraction_non_alphanumeric': 0.13293650793650794, 'fraction_numerical': 0.0, 'mean_word_length': 2.6569948186528496, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4622718', 'n_tokens_mistral': 987, 'n_tokens_neox': 976, 'n_words': 222}