@@ -114,7 +114,7 @@ export default contain({
114114 url,
115115 logo,
116116 company,
117- isFrontEndCert,
117+ isFrontEndCert = true ,
118118 isFullStackCert,
119119 isHighlighted,
120120 isRemoteOk,
@@ -171,7 +171,7 @@ export default contain({
171171 }
172172 } ) ;
173173
174- if ( ! valid ) {
174+ if ( ! valid || ! props . isFrontEndCert && ! props . isFullStackCert ) {
175175 debug ( 'form not valid' ) ;
176176 return ;
177177 }
@@ -234,6 +234,18 @@ export default contain({
234234 handleForm ( { [ name ] : value } ) ;
235235 } ,
236236
237+ handleCertClick ( name ) {
238+ const { jobActions : { handleForm } } = this . props ;
239+ const otherButton = name === 'isFrontEndCert' ?
240+ 'isFullStackCert' :
241+ 'isFrontEndCert' ;
242+
243+ handleForm ( {
244+ [ name ] : true ,
245+ [ otherButton ] : false
246+ } ) ;
247+ } ,
248+
237249 render ( ) {
238250 const {
239251 position,
@@ -275,7 +287,11 @@ export default contain({
275287 xs = { 6 }
276288 xsOffset = { 3 } >
277289 < Row >
278- < Button className = { isFrontEndCert ? '' : 'active' } >
290+ < Button
291+ className = { isFrontEndCert ? 'active' : '' }
292+ onClick = { ( ) => this . handleCertClick (
293+ 'isFrontEndCert'
294+ ) } >
279295 < h4 > Front End Development Certified</ h4 >
280296 You can expect each applicant
281297 to have a code portfolio using the
@@ -287,7 +303,11 @@ export default contain({
287303 </ Row >
288304 < div className = 'button-spacer' />
289305 < Row >
290- < Button className = { isFullStackCert ? 'active' : '' } >
306+ < Button
307+ className = { isFullStackCert ? 'active' : '' }
308+ onClick = { ( ) => this . handleCertClick (
309+ 'isFullStackCert'
310+ ) } >
291311 < h4 > Full Stack Development Certified</ h4 >
292312 You can expect each applicant to have a code
293313 portfolio using the following technologies:
0 commit comments