From feac941b1c8e7d86869497d274bb6a759ff692fa Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 4 Nov 2015 14:23:42 -0800 Subject: [PATCH] Add logic to cert buttons --- common/app/routes/Jobs/components/NewJob.jsx | 28 +++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/common/app/routes/Jobs/components/NewJob.jsx b/common/app/routes/Jobs/components/NewJob.jsx index 6dce6817c0..9697e420c4 100644 --- a/common/app/routes/Jobs/components/NewJob.jsx +++ b/common/app/routes/Jobs/components/NewJob.jsx @@ -114,7 +114,7 @@ export default contain({ url, logo, company, - isFrontEndCert, + isFrontEndCert = true, isFullStackCert, isHighlighted, isRemoteOk, @@ -171,7 +171,7 @@ export default contain({ } }); - if (!valid) { + if (!valid || !props.isFrontEndCert && !props.isFullStackCert ) { debug('form not valid'); return; } @@ -234,6 +234,18 @@ export default contain({ handleForm({ [name]: value }); }, + handleCertClick(name) { + const { jobActions: { handleForm } } = this.props; + const otherButton = name === 'isFrontEndCert' ? + 'isFullStackCert' : + 'isFrontEndCert'; + + handleForm({ + [name]: true, + [otherButton]: false + }); + }, + render() { const { position, @@ -275,7 +287,11 @@ export default contain({ xs={ 6 } xsOffset={ 3 }> -