File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 35
35
{ "name" : " Transport and Logistics" , "_id" : " Transport and Logistics" },
36
36
{ "name" : " Other" , "_id" : " Other" }
37
37
],
38
+
38
39
"hearAboutCYFList" : [
40
+ { "name" : " Employer" , "_id" : " Employer" },
39
41
{ "name" : " Search engine" , "_id" : " Search engine" },
40
42
{ "name" : " Colleague or friend" , "_id" : " Colleague or friend" },
41
43
{ "name" : " Conference" , "_id" : " Conference" },
45
47
{ "name" : " Other" , "_id" : " Other" }
46
48
],
47
49
50
+ "employerList" : [
51
+ { "name" : " Capgemini" , "_id" : " Capgemini" },
52
+ { "name" : " Other" , "_id" : " Other" }
53
+ ],
54
+
48
55
"radioButtonList" : [
49
56
{ "value" : " None" , "_id" : " None" },
50
57
{ "value" : " Some" , "_id" : " Some" },
51
58
{ "value" : " Professional experience" , "_id" : " Professional experience" }
52
59
],
60
+
53
61
"guidePeopleSkillList" : [
54
62
{
55
63
"id" : " 98y439hf934" ,
64
72
"label" : " Help people learn public speaking"
65
73
}
66
74
],
75
+
67
76
"techSkillList" : [
68
77
{
69
78
"id" : " 8976tygsbhj3e" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export const initialState = {
10
10
interestedInCYF : '' ,
11
11
industry : '' ,
12
12
hearAboutCYF : '' ,
13
+ hearAboutCYFFromEmployer : false ,
14
+ employer : '' ,
13
15
guidePeople : ListsData . guidePeopleSkillList ,
14
16
techSkill : ListsData . techSkillList ,
15
17
otherSkill : ListsData . otherSkillList ,
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ class Forms extends Component {
100
100
err : null
101
101
} )
102
102
}
103
+ if ( name === 'hearAboutCYF' ) {
104
+ this . setState ( { hearAboutCYFFromEmployer : value === 'Employer' } )
105
+ }
103
106
}
104
107
105
108
validateForm = values => {
@@ -154,6 +157,8 @@ class Forms extends Component {
154
157
interestedInCYF,
155
158
industry,
156
159
hearAboutCYF,
160
+ hearAboutCYFFromEmployer,
161
+ employer,
157
162
guidePeople,
158
163
techSkill,
159
164
otherSkill,
@@ -167,6 +172,7 @@ class Forms extends Component {
167
172
lastName,
168
173
email,
169
174
cityId,
175
+ employer : hearAboutCYFFromEmployer ? employer : true ,
170
176
interestedInVolunteer,
171
177
tel,
172
178
agreeToTOU,
@@ -191,6 +197,7 @@ class Forms extends Component {
191
197
interestedInCYF,
192
198
industry,
193
199
hearAboutCYF,
200
+ employer : hearAboutCYFFromEmployer ? employer : '' ,
194
201
guidePeople : filterEmptyValue ( guidePeople ) ,
195
202
techSkill : filterEmptyValue ( techSkill ) ,
196
203
otherSkill : filterEmptyValue ( otherSkill ) ,
Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ export default class VolunteerForm extends Component {
24
24
interestedInCYF,
25
25
industry,
26
26
hearAboutCYF,
27
+ hearAboutCYFFromEmployer,
27
28
onChangeCheckList,
28
29
guidePeople,
29
30
techSkill,
30
- otherSkill
31
+ otherSkill,
32
+ employer
31
33
} = this . props
32
34
33
35
return (
@@ -109,6 +111,7 @@ export default class VolunteerForm extends Component {
109
111
isEmpty = { errors . industry }
110
112
label = "What industry are you in?"
111
113
/>
114
+
112
115
< DropDown
113
116
onChange = { onChange }
114
117
value = { hearAboutCYF }
@@ -117,6 +120,16 @@ export default class VolunteerForm extends Component {
117
120
isEmpty = { errors . hearAboutCYF }
118
121
label = "Where did you hear about Code Your Future?"
119
122
/>
123
+ { hearAboutCYFFromEmployer && (
124
+ < DropDown
125
+ onChange = { onChange }
126
+ value = { employer }
127
+ name = "employer"
128
+ arrayList = { ListsData . employerList }
129
+ isEmpty = { errors . employer }
130
+ label = "Who is your employer? *"
131
+ />
132
+ ) }
120
133
< span className = "contact-interested" >
121
134
< span >
122
135
What would you like help Code Your Future with, and what is your
You can’t perform that action at this time.
0 commit comments