import React, { PropTypes } from 'react';
import { resetForm, reduxForm } from 'redux-form';
import {
Button,
FormGroup,
FormControl
} from 'react-bootstrap';
import {
isValidURL,
makeRequired,
createFormValidator,
getValidationState
} from '../../../../utils/form';
import { submitChallenge, showProjectSubmit } from '../../redux/actions';
const propTypes = {
isSignedIn: PropTypes.bool,
isSubmitting: PropTypes.bool,
showProjectSubmit: PropTypes.func,
fields: PropTypes.object,
handleSubmit: PropTypes.func,
submitChallenge: PropTypes.func,
resetForm: PropTypes.func
};
const bindableActions = {
resetForm,
submitChallenge,
showProjectSubmit
};
const frontEndFields = [ 'solution' ];
const backEndFields = [
'solution',
'githubLink'
];
const fieldValidators = {
solution: makeRequired(isValidURL)
};
const backEndFieldValidators = {
...fieldValidators,
githubLink: makeRequired(isValidURL)
};
export function SolutionInput({ solution, placeholder }) {
return (