Skip to content

Commit fe1929e

Browse files
Wolfjawankkarimi
authored andcommitted
privacy-policy and term of use update (#66)
1 parent 0ca3465 commit fe1929e

File tree

3 files changed

+30
-68
lines changed

3 files changed

+30
-68
lines changed
Lines changed: 21 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import React, { Fragment } from 'react'
22
import { FormGroup, Label, Input } from 'reactstrap'
33

4-
export default ({
5-
onChange,
6-
agreeToTOU,
7-
agreeToReceiveEmails,
8-
agreeToReceivePhoneCall,
9-
agreeToReceiveCYFNews
10-
}) => {
4+
export default ({ onChange, agreeToTOU, agreeToReceiveCommunication }) => {
115
return (
126
<Fragment>
137
<div className="form-acknowledgement-header mt-4">Acknowledgement:</div>
148
<hr className="mt-0" />
9+
<p>
10+
Code Your Future may call you, send you SMS or email you as part of your
11+
volunteering process with us. Your data is protected in accordance with
12+
our privacy policy.
13+
</p>
1514
<FormGroup check>
1615
<Label check htmlFor="agreeToTOU">
1716
<Input
@@ -22,7 +21,7 @@ export default ({
2221
id="agreeToTOU"
2322
checked={agreeToTOU}
2423
/>
25-
I have read and accepted to the{' '}
24+
Yes, I have read and accepted the{' '}
2625
<a
2726
href="https://codeyourfuture.io/terms/"
2827
target="_blank"
@@ -41,49 +40,20 @@ export default ({
4140
<strong className="text-danger">*</strong>
4241
</Label>
4342
</FormGroup>
44-
<p className="mt-2 mb-0">CodeYourFuture can:</p>
45-
<ul>
46-
<FormGroup check>
47-
<Label check htmlFor="agreeToReceiveEmails">
48-
<Input
49-
className={`form-check-input`}
50-
type="checkbox"
51-
name="agreeToReceiveEmails"
52-
id="agreeToReceiveEmails"
53-
onChange={onChange}
54-
checked={agreeToReceiveEmails}
55-
/>
56-
Send me emails relevant to my volunteering{' '}
57-
<strong className="text-danger">*</strong>
58-
</Label>
59-
</FormGroup>
60-
<FormGroup check>
61-
<Label check htmlFor="agreeToReceivePhoneCall">
62-
<Input
63-
className={`form-check-input`}
64-
type="checkbox"
65-
name="agreeToReceivePhoneCall"
66-
id="agreeToReceivePhoneCall"
67-
onChange={onChange}
68-
checked={agreeToReceivePhoneCall}
69-
/>
70-
Contact me via telephone in regards to volunteering
71-
</Label>
72-
</FormGroup>
73-
<FormGroup check>
74-
<Label check htmlFor="agreeToReceiveCYFNews">
75-
<Input
76-
className={`form-check-input`}
77-
type="checkbox"
78-
name="agreeToReceiveCYFNews"
79-
id="agreeToReceiveCYFNews"
80-
onChange={onChange}
81-
checked={agreeToReceiveCYFNews}
82-
/>
83-
Contact me via email about events and other CYF news
84-
</Label>
85-
</FormGroup>
86-
</ul>
43+
<FormGroup check>
44+
<Label check htmlFor="agreeToReceiveCommunication">
45+
<Input
46+
className={`form-check-input`}
47+
type="checkbox"
48+
name="agreeToReceiveCommunication"
49+
id="agreeToReceiveCommunication"
50+
onChange={onChange}
51+
checked={agreeToReceiveCommunication}
52+
/>
53+
Yes, contact me about volunteering activities and related events{' '}
54+
<strong className="text-danger">*</strong>
55+
</Label>
56+
</FormGroup>
8757
</Fragment>
8858
)
8959
}

src/Components/forms/helper.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export const initialState = {
2222
userId: '',
2323
dashboardUrl: '',
2424
agreeToTOU: false,
25-
agreeToReceiveEmails: false,
26-
agreeToReceivePhoneCall: false,
27-
agreeToReceiveCYFNews: false,
25+
agreeToReceiveCommunication: false,
2826
errors: {
2927
firstName: false,
3028
lastName: false,
@@ -34,9 +32,7 @@ export const initialState = {
3432
interestedInVolunteer: false,
3533
interestedInCYF: false,
3634
agreeToTOU: false,
37-
agreeToReceiveEmails: false,
38-
agreeToReceivePhoneCall: false,
39-
agreeToReceiveCYFNews: false
35+
agreeToReceiveCommunication: false
4036
}
4137
}
4238

src/Components/forms/index.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ class Forms extends Component {
9595
otherSkill,
9696
userId,
9797
agreeToTOU,
98-
agreeToReceiveEmails,
99-
agreeToReceivePhoneCall,
100-
agreeToReceiveCYFNews
98+
agreeToReceiveCommunication
10199
} = this.state
102100

103101
const validatedInputs = this.validateForm({
@@ -108,8 +106,8 @@ class Forms extends Component {
108106
interestedInVolunteer,
109107
tel,
110108
agreeToTOU,
111-
agreeToReceiveEmails,
112-
interestedInCYF
109+
interestedInCYF,
110+
agreeToReceiveCommunication
113111
})
114112
await this.validateArray({ guidePeople, techSkill, otherSkill })
115113
const emptyValues = validatedInputs.includes(true)
@@ -134,9 +132,7 @@ class Forms extends Component {
134132
otherSkill: filterEmptyValue(otherSkill),
135133
userId,
136134
agreeToTOU,
137-
agreeToReceiveEmails,
138-
agreeToReceivePhoneCall,
139-
agreeToReceiveCYFNews
135+
agreeToReceiveCommunication
140136
})
141137
}
142138
}
@@ -168,10 +164,10 @@ class Forms extends Component {
168164
const {
169165
disabled,
170166
agreeToTOU,
171-
agreeToReceiveEmails,
172167
formInComplete,
173168
userId,
174-
dashboardUrl
169+
dashboardUrl,
170+
agreeToReceiveCommunication
175171
} = this.state
176172
if (volunteer && volunteer._id) {
177173
return (
@@ -212,7 +208,7 @@ class Forms extends Component {
212208
<button
213209
className="btn volunteer-submit-btn"
214210
type="submit"
215-
disabled={disabled || !agreeToTOU || !agreeToReceiveEmails}
211+
disabled={disabled || !agreeToTOU || !agreeToReceiveCommunication}
216212
>
217213
Submit
218214
</button>

0 commit comments

Comments
 (0)