diff --git a/common/app/routes/challenges/components/project/Forms.jsx b/common/app/routes/challenges/components/project/Forms.jsx index 13b59c3a2a..de56b08923 100644 --- a/common/app/routes/challenges/components/project/Forms.jsx +++ b/common/app/routes/challenges/components/project/Forms.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { reduxForm } from 'redux-form'; +import { resetForm, reduxForm } from 'redux-form'; import { Button, FormGroup, @@ -20,10 +20,15 @@ const propTypes = { showProjectSubmit: PropTypes.func, fields: PropTypes.object, handleSubmit: PropTypes.func, - submitChallenge: PropTypes.func + submitChallenge: PropTypes.func, + resetForm: PropTypes.func }; -const bindableActions = { submitChallenge, showProjectSubmit }; +const bindableActions = { + resetForm, + submitChallenge, + showProjectSubmit +}; const frontEndFields = [ 'solution' ]; const backEndFields = [ 'solution', @@ -64,6 +69,7 @@ export function _FrontEndForm({ fields, handleSubmit, submitChallenge, + resetForm, isSubmitting, showProjectSubmit }) { @@ -73,7 +79,12 @@ export function _FrontEndForm({ return (