From c8b0a6cf748fc2531571c5afd89dc258f7e5b846 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 8 Jun 2016 11:11:13 -0700 Subject: [PATCH] Submit projects --- .../challenges/components/project/Forms.jsx | 27 +++++++++-- .../challenges/redux/completion-saga.js | 48 +++++++++++++++++-- common/app/utils/challengeTypes.js | 22 ++++----- common/models/challenge.json | 2 +- server/boot/challenge.js | 44 +++++++---------- 5 files changed, 95 insertions(+), 48 deletions(-) diff --git a/common/app/routes/challenges/components/project/Forms.jsx b/common/app/routes/challenges/components/project/Forms.jsx index 3ab5b62df9..13b59c3a2a 100644 --- a/common/app/routes/challenges/components/project/Forms.jsx +++ b/common/app/routes/challenges/components/project/Forms.jsx @@ -39,7 +39,7 @@ const backEndFieldValidators = { githubLink: makeRequired(isValidURL) }; -export function SolutionInput({ solution }) { +export function SolutionInput({ solution, placeholder }) { return ( @@ -55,7 +55,10 @@ export function SolutionInput({ solution }) { ); } -SolutionInput.propTypes = { solution: PropTypes.object }; +SolutionInput.propTypes = { + solution: PropTypes.object, + placeholder: PropTypes.string +}; export function _FrontEndForm({ fields, @@ -72,7 +75,14 @@ export function _FrontEndForm({ name='NewFrontEndProject' onSubmit={ handleSubmit(submitChallenge)} > - { isSubmitting ? : null } + { + isSubmitting ? + : + null + }