Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import React from 'react'
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import { decoreText } from 'utils/decoreText'
import classNames from 'classnames'
import { SgeStore } from 'models/sgeStore.model'
interface StepConsentProps {
sgeState: SgeStore
onChange: (key: string, value: boolean, maxLength?: number) => void
}
const StepConsent: React.FC<StepConsentProps> = ({
sgeState,
onChange,
}: StepConsentProps) => {
const { t } = useI18n()
return (
<div className="sge-step-container stepConsent">
<div className="head text-16-normal">
{t('auth.enedis-sge-grandlyon.headConsent')}
</div>
<div className="title text-22-bold">
{t('auth.enedis-sge-grandlyon.textConsent')}
</div>
<ul className="text-16-normal">
<li>{t('auth.enedis-sge-grandlyon.consentLi1')}</li>
<li>{t('auth.enedis-sge-grandlyon.consentLi2')}</li>
<li>{t('auth.enedis-sge-grandlyon.consentLi3')}</li>
<li>{t('auth.enedis-sge-grandlyon.consentLi4')}</li>
</ul>
<hr />
<label
className={classNames('checkbox', {
['answer-checked']: sgeState.dataConsent,
})}
>
<input
id="dataConsent"
type="checkbox"
name="Data-consent-validation"
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
onChange('dataConsent', e.target.checked)
}
checked={sgeState.dataConsent}
/>
<span>{decoreText(t('auth.enedis-sge-grandlyon.consentCheck1'))}</span>
</label>
<label
className={classNames('checkbox', {
['answer-checked']: sgeState.pdlConfirm,
})}
>
<input
id="pdlConfirm"
type="checkbox"
name="Data-consent-validation"
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
onChange('pdlConfirm', e.target.checked)
}
checked={sgeState.pdlConfirm}
/>
{decoreText(t('auth.enedis-sge-grandlyon.consentCheck2'))}
</label>
</div>
)
}
export default StepConsent