@financial-times/n-conversion-forms 28.9.0 → 28.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/__snapshots__/accept-terms.spec.js.snap +2 -145
- package/components/accept-terms.jsx +7 -43
- package/components/accept-terms.spec.js +2 -23
- package/components/accept-terms.stories.js +9 -9
- package/dist/accept-terms.js +9 -34
- package/package.json +1 -1
- package/styles/accept-terms.scss +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`AcceptTerms renders
|
|
3
|
+
exports[`AcceptTerms renders a component matching snapshot when withPrivacyPolicyTerms is true 1`] = `
|
|
4
4
|
<div id="acceptTermsField"
|
|
5
5
|
class="o-forms-field o-layout-typography ncf__validation-error"
|
|
6
6
|
data-validate="required,checked"
|
|
7
7
|
>
|
|
8
|
-
<div class="
|
|
8
|
+
<div class="privacy-policy-terms">
|
|
9
9
|
<span class="consent-text--top">
|
|
10
10
|
For more information about how we use your data, please refer to our
|
|
11
11
|
<a class="ncf__link--external"
|
|
@@ -58,70 +58,6 @@ exports[`AcceptTerms renders appropriately if a isAuthFirstAccount 1`] = `
|
|
|
58
58
|
</div>
|
|
59
59
|
`;
|
|
60
60
|
|
|
61
|
-
exports[`AcceptTerms renders appropriately if a isAuthFirstPayment 1`] = `
|
|
62
|
-
<div id="acceptTermsField"
|
|
63
|
-
class="o-forms-field o-layout-typography ncf__validation-error"
|
|
64
|
-
data-validate="required,checked"
|
|
65
|
-
>
|
|
66
|
-
<ul class="o-typography-list ncf__accept-terms-list">
|
|
67
|
-
</ul>
|
|
68
|
-
<label class="o-forms-input o-forms-input--checkbox"
|
|
69
|
-
for="termsAcceptance"
|
|
70
|
-
>
|
|
71
|
-
<input type="checkbox"
|
|
72
|
-
id="termsAcceptance"
|
|
73
|
-
name="termsAcceptance"
|
|
74
|
-
value="true"
|
|
75
|
-
data-trackable="field-terms"
|
|
76
|
-
aria-required="true"
|
|
77
|
-
required
|
|
78
|
-
>
|
|
79
|
-
<span class="o-forms-input__label">
|
|
80
|
-
I agree to the above terms & conditions.
|
|
81
|
-
</span>
|
|
82
|
-
<p class="o-forms-input__error">
|
|
83
|
-
Please accept our terms & conditions
|
|
84
|
-
</p>
|
|
85
|
-
</label>
|
|
86
|
-
</div>
|
|
87
|
-
`;
|
|
88
|
-
|
|
89
|
-
exports[`AcceptTerms renders appropriately if a registration 1`] = `
|
|
90
|
-
<div id="acceptTermsField"
|
|
91
|
-
class="o-forms-field o-layout-typography ncf__validation-error"
|
|
92
|
-
data-validate="required,checked"
|
|
93
|
-
data-trackable="register-up-terms"
|
|
94
|
-
>
|
|
95
|
-
<label class="o-forms-input o-forms-input--checkbox"
|
|
96
|
-
for="termsAcceptance"
|
|
97
|
-
>
|
|
98
|
-
<input type="checkbox"
|
|
99
|
-
id="termsAcceptance"
|
|
100
|
-
name="termsAcceptance"
|
|
101
|
-
value="true"
|
|
102
|
-
data-trackable="field-terms"
|
|
103
|
-
aria-required="true"
|
|
104
|
-
required
|
|
105
|
-
>
|
|
106
|
-
<span class="o-forms-input__label terms-register">
|
|
107
|
-
I confirm I am 16 years or older and have read and agree to the
|
|
108
|
-
<a class="ncf__link--external"
|
|
109
|
-
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
110
|
-
target="_blank"
|
|
111
|
-
rel="noopener noreferrer"
|
|
112
|
-
data-trackable="terms-and-conditions"
|
|
113
|
-
>
|
|
114
|
-
Terms & Conditions
|
|
115
|
-
</a>
|
|
116
|
-
.
|
|
117
|
-
</span>
|
|
118
|
-
<p class="o-forms-input__error">
|
|
119
|
-
Please accept our terms & conditions
|
|
120
|
-
</p>
|
|
121
|
-
</label>
|
|
122
|
-
</div>
|
|
123
|
-
`;
|
|
124
|
-
|
|
125
61
|
exports[`AcceptTerms renders appropriately if a signup 1`] = `
|
|
126
62
|
<div id="acceptTermsField"
|
|
127
63
|
class="o-forms-field o-layout-typography ncf__validation-error"
|
|
@@ -196,85 +132,6 @@ exports[`AcceptTerms renders appropriately if a signup 1`] = `
|
|
|
196
132
|
</div>
|
|
197
133
|
`;
|
|
198
134
|
|
|
199
|
-
exports[`AcceptTerms renders appropriately if a signup and has special terms 1`] = `
|
|
200
|
-
<div id="acceptTermsField"
|
|
201
|
-
class="o-forms-field o-layout-typography ncf__validation-error"
|
|
202
|
-
data-validate="required,checked"
|
|
203
|
-
data-trackable="sign-up-terms"
|
|
204
|
-
>
|
|
205
|
-
<ul class="o-typography-list ncf__accept-terms-list">
|
|
206
|
-
<li>
|
|
207
|
-
<span class="terms-default">
|
|
208
|
-
I confirm I am 16 years or older and have read and agree to the
|
|
209
|
-
<a class="ncf__link--external"
|
|
210
|
-
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
211
|
-
target="_blank"
|
|
212
|
-
rel="noopener noreferrer"
|
|
213
|
-
data-trackable="terms-and-conditions"
|
|
214
|
-
>
|
|
215
|
-
Terms & Conditions
|
|
216
|
-
</a>
|
|
217
|
-
.
|
|
218
|
-
</span>
|
|
219
|
-
</li>
|
|
220
|
-
<li>
|
|
221
|
-
<span class="terms-signup">
|
|
222
|
-
I give consent for my chosen payment method to be charged automatically at the end of each subscription term until I cancel it by contacting
|
|
223
|
-
<a class="ncf__link--external"
|
|
224
|
-
href="https://help.ft.com/help/contact-us/"
|
|
225
|
-
target="_blank"
|
|
226
|
-
rel="noopener noreferrer"
|
|
227
|
-
>
|
|
228
|
-
customer care through chat, phone or email
|
|
229
|
-
</a>
|
|
230
|
-
.
|
|
231
|
-
</span>
|
|
232
|
-
</li>
|
|
233
|
-
<li>
|
|
234
|
-
<span class="terms-signup">
|
|
235
|
-
By placing my order, my subscription will start immediately and I am aware and agree that I will therefore lose my statutory right to cancel my subscription within 14 days of acceptance of my order. Any notice of cancellation that I provide will only take effect at the end of my subscription period and previously paid amounts are non-refundable, except in the event that there is a fault in the provision of the services.
|
|
236
|
-
</span>
|
|
237
|
-
</li>
|
|
238
|
-
<li>
|
|
239
|
-
<span class="terms-signup">
|
|
240
|
-
Find out more about our cancellation policy in our
|
|
241
|
-
<a class="ncf__link--external"
|
|
242
|
-
href="https://help.ft.com/legal-privacy/terms-and-conditions/"
|
|
243
|
-
target="_blank"
|
|
244
|
-
rel="noopener noreferrer"
|
|
245
|
-
>
|
|
246
|
-
Terms & Conditions
|
|
247
|
-
</a>
|
|
248
|
-
.
|
|
249
|
-
</span>
|
|
250
|
-
</li>
|
|
251
|
-
<li>
|
|
252
|
-
<span class="terms-special">
|
|
253
|
-
Special terms text
|
|
254
|
-
</span>
|
|
255
|
-
</li>
|
|
256
|
-
</ul>
|
|
257
|
-
<label class="o-forms-input o-forms-input--checkbox"
|
|
258
|
-
for="termsAcceptance"
|
|
259
|
-
>
|
|
260
|
-
<input type="checkbox"
|
|
261
|
-
id="termsAcceptance"
|
|
262
|
-
name="termsAcceptance"
|
|
263
|
-
value="true"
|
|
264
|
-
data-trackable="field-terms"
|
|
265
|
-
aria-required="true"
|
|
266
|
-
required
|
|
267
|
-
>
|
|
268
|
-
<span class="o-forms-input__label">
|
|
269
|
-
I agree to the above terms & conditions.
|
|
270
|
-
</span>
|
|
271
|
-
<p class="o-forms-input__error">
|
|
272
|
-
Please accept our terms & conditions
|
|
273
|
-
</p>
|
|
274
|
-
</label>
|
|
275
|
-
</div>
|
|
276
|
-
`;
|
|
277
|
-
|
|
278
135
|
exports[`AcceptTerms renders appropriately if a signup for the print product 1`] = `
|
|
279
136
|
<div id="acceptTermsField"
|
|
280
137
|
class="o-forms-field o-layout-typography ncf__validation-error"
|
|
@@ -6,11 +6,9 @@ const DEFAULT_AGE_RESTRICTION = '16';
|
|
|
6
6
|
const DEFAULT_PRIVACY_POLICIES_POSITION = 'top';
|
|
7
7
|
|
|
8
8
|
export function AcceptTerms({
|
|
9
|
-
|
|
10
|
-
isAuthFirstPayment = false,
|
|
9
|
+
withPrivacyPolicyTerms = false,
|
|
11
10
|
hasError = false,
|
|
12
11
|
isSignup = false,
|
|
13
|
-
isRegister = false,
|
|
14
12
|
isChecked = false,
|
|
15
13
|
isB2b = false,
|
|
16
14
|
isB2cPartnership = false,
|
|
@@ -21,7 +19,6 @@ export function AcceptTerms({
|
|
|
21
19
|
isTransition = false,
|
|
22
20
|
transitionType = null,
|
|
23
21
|
isPrintProduct = false,
|
|
24
|
-
specialTerms = null,
|
|
25
22
|
isSingleTerm = false,
|
|
26
23
|
isDeferredBilling = false,
|
|
27
24
|
hideConfirmTermsAndConditions = false,
|
|
@@ -33,7 +30,6 @@ export function AcceptTerms({
|
|
|
33
30
|
className: 'o-forms-field o-layout-typography ncf__validation-error',
|
|
34
31
|
'data-validate': 'required,checked',
|
|
35
32
|
...(isSignup && { 'data-trackable': 'sign-up-terms' }),
|
|
36
|
-
...(isRegister && { 'data-trackable': 'register-up-terms' }),
|
|
37
33
|
};
|
|
38
34
|
|
|
39
35
|
const labelClassName = classNames([
|
|
@@ -55,8 +51,8 @@ export function AcceptTerms({
|
|
|
55
51
|
...(isChecked && { defaultChecked: true }),
|
|
56
52
|
};
|
|
57
53
|
|
|
58
|
-
const
|
|
59
|
-
<div className="
|
|
54
|
+
const privacyPolicyTerms = (
|
|
55
|
+
<div className="privacy-policy-terms">
|
|
60
56
|
<span className={`consent-text--${privacyPoliciesPosition}`}>
|
|
61
57
|
For more information about how we use your data, please refer to our{' '}
|
|
62
58
|
<a
|
|
@@ -106,29 +102,6 @@ export function AcceptTerms({
|
|
|
106
102
|
</div>
|
|
107
103
|
);
|
|
108
104
|
|
|
109
|
-
const registerTerms = (
|
|
110
|
-
<label className={labelClassName} htmlFor="termsAcceptance">
|
|
111
|
-
<input {...inputProps} />
|
|
112
|
-
<span className="o-forms-input__label terms-register">
|
|
113
|
-
I confirm I am {ageRestriction} years or older and have read and agree
|
|
114
|
-
to the{' '}
|
|
115
|
-
<a
|
|
116
|
-
className="ncf__link--external"
|
|
117
|
-
href="http://help.ft.com/help/legal-privacy/terms-conditions/"
|
|
118
|
-
target={isEmbedded ? '_top' : '_blank'}
|
|
119
|
-
rel="noopener noreferrer"
|
|
120
|
-
data-trackable="terms-and-conditions"
|
|
121
|
-
>
|
|
122
|
-
Terms & Conditions
|
|
123
|
-
</a>
|
|
124
|
-
.
|
|
125
|
-
</span>
|
|
126
|
-
<p className="o-forms-input__error">
|
|
127
|
-
Please accept our terms & conditions
|
|
128
|
-
</p>
|
|
129
|
-
</label>
|
|
130
|
-
);
|
|
131
|
-
|
|
132
105
|
const b2bTerms = isB2b ? (
|
|
133
106
|
<li>
|
|
134
107
|
<span className="terms-b2b">
|
|
@@ -324,12 +297,6 @@ export function AcceptTerms({
|
|
|
324
297
|
</li>
|
|
325
298
|
</>
|
|
326
299
|
)}
|
|
327
|
-
|
|
328
|
-
{specialTerms && (
|
|
329
|
-
<li>
|
|
330
|
-
<span className="terms-special">{specialTerms}</span>
|
|
331
|
-
</li>
|
|
332
|
-
)}
|
|
333
300
|
</>
|
|
334
301
|
);
|
|
335
302
|
|
|
@@ -369,14 +336,12 @@ export function AcceptTerms({
|
|
|
369
336
|
<div {...divProps}>
|
|
370
337
|
{isB2cPartnership ? (
|
|
371
338
|
b2cPartnershipTerms
|
|
372
|
-
) :
|
|
373
|
-
|
|
374
|
-
) : isAuthFirstAccount ? (
|
|
375
|
-
authFirstStepTerms
|
|
339
|
+
) : withPrivacyPolicyTerms ? (
|
|
340
|
+
privacyPolicyTerms
|
|
376
341
|
) : (
|
|
377
342
|
<>
|
|
378
343
|
<ul className="o-typography-list ncf__accept-terms-list">
|
|
379
|
-
{
|
|
344
|
+
{b2bTerms}
|
|
380
345
|
{corpSignupTerms}
|
|
381
346
|
{transitionTerms}
|
|
382
347
|
{signupTerms}
|
|
@@ -398,9 +363,9 @@ export function AcceptTerms({
|
|
|
398
363
|
}
|
|
399
364
|
|
|
400
365
|
AcceptTerms.propTypes = {
|
|
366
|
+
withPrivacyPolicyTerms: PropTypes.bool,
|
|
401
367
|
hasError: PropTypes.bool,
|
|
402
368
|
isSignup: PropTypes.bool,
|
|
403
|
-
isRegister: PropTypes.bool,
|
|
404
369
|
isChecked: PropTypes.bool,
|
|
405
370
|
isB2b: PropTypes.bool,
|
|
406
371
|
isB2cPartnership: PropTypes.bool,
|
|
@@ -411,7 +376,6 @@ AcceptTerms.propTypes = {
|
|
|
411
376
|
isTransition: PropTypes.bool,
|
|
412
377
|
transitionType: PropTypes.string,
|
|
413
378
|
isPrintProduct: PropTypes.bool,
|
|
414
|
-
specialTerms: PropTypes.string,
|
|
415
379
|
isSingleTerm: PropTypes.bool,
|
|
416
380
|
isDeferredBilling: PropTypes.bool,
|
|
417
381
|
hideConfirmTermsAndConditions: PropTypes.bool,
|
|
@@ -16,14 +16,8 @@ describe('AcceptTerms', () => {
|
|
|
16
16
|
expect(AcceptTerms).toRenderCorrectly(props);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
it('renders
|
|
20
|
-
const props = {
|
|
21
|
-
|
|
22
|
-
expect(AcceptTerms).toRenderCorrectly(props);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('renders appropriately if a isAuthFirstPayment', () => {
|
|
26
|
-
const props = { isAuthFirstPayment: true };
|
|
19
|
+
it('renders a component matching snapshot when withPrivacyPolicyTerms is true', () => {
|
|
20
|
+
const props = { withPrivacyPolicyTerms: true };
|
|
27
21
|
|
|
28
22
|
expect(AcceptTerms).toRenderCorrectly(props);
|
|
29
23
|
});
|
|
@@ -70,21 +64,6 @@ describe('AcceptTerms', () => {
|
|
|
70
64
|
expect(AcceptTerms).toRenderCorrectly(props);
|
|
71
65
|
});
|
|
72
66
|
|
|
73
|
-
it('renders appropriately if a signup and has special terms', () => {
|
|
74
|
-
const props = {
|
|
75
|
-
isSignup: true,
|
|
76
|
-
specialTerms: 'Special terms text',
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
expect(AcceptTerms).toRenderCorrectly(props);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('renders appropriately if a registration', () => {
|
|
83
|
-
const props = { isRegister: true };
|
|
84
|
-
|
|
85
|
-
expect(AcceptTerms).toRenderCorrectly(props);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
67
|
it('renders appropriately if input is checked', () => {
|
|
89
68
|
const props = { isChecked: true };
|
|
90
69
|
|
|
@@ -12,16 +12,14 @@ export default {
|
|
|
12
12
|
options: ['immediate', 'endOfTerm'],
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
withPrivacyPolicyTerms: {
|
|
16
16
|
control: 'boolean',
|
|
17
17
|
table: {
|
|
18
|
-
type: { summary: 'Show
|
|
18
|
+
type: { summary: 'Show privacy policy terms' },
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
isAuthFirstPayment: { control: 'boolean' },
|
|
22
21
|
hasError: { control: 'boolean' },
|
|
23
22
|
isSignup: { control: 'boolean' },
|
|
24
|
-
isRegister: { control: 'boolean' },
|
|
25
23
|
isChecked: { control: 'boolean' },
|
|
26
24
|
isB2b: { control: 'boolean' },
|
|
27
25
|
isB2cPartnership: { control: 'boolean' },
|
|
@@ -36,7 +34,9 @@ export default {
|
|
|
36
34
|
children: {
|
|
37
35
|
control: false,
|
|
38
36
|
table: {
|
|
39
|
-
type: {
|
|
37
|
+
type: {
|
|
38
|
+
summary: "Only rendered when 'withPrivacyPolicyTerms' is true",
|
|
39
|
+
},
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
privacyPoliciesPosition: {
|
|
@@ -56,12 +56,12 @@ Basic.args = {};
|
|
|
56
56
|
|
|
57
57
|
export const NewBuyFlow = (args) => <AcceptTerms {...args} />;
|
|
58
58
|
NewBuyFlow.args = {
|
|
59
|
-
|
|
59
|
+
withPrivacyPolicyTerms: true,
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
export const NewBuyFlowEmailVerification = (args) => <AcceptTerms {...args} />;
|
|
63
63
|
NewBuyFlowEmailVerification.args = {
|
|
64
|
-
|
|
64
|
+
withPrivacyPolicyTerms: true,
|
|
65
65
|
hideConfirmTermsAndConditions: true,
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -71,12 +71,12 @@ export const NewBuyFlowWithChildren = (args) => (
|
|
|
71
71
|
</AcceptTerms>
|
|
72
72
|
);
|
|
73
73
|
NewBuyFlowWithChildren.args = {
|
|
74
|
-
|
|
74
|
+
withPrivacyPolicyTerms: true,
|
|
75
75
|
privacyPoliciesPosition: 'bottom',
|
|
76
76
|
};
|
|
77
77
|
NewBuyFlowWithChildren.parameters = {
|
|
78
78
|
controls: {
|
|
79
|
-
include: ['privacyPoliciesPosition', '
|
|
79
|
+
include: ['privacyPoliciesPosition', 'withPrivacyPolicyTerms', 'children'],
|
|
80
80
|
expanded: true,
|
|
81
81
|
},
|
|
82
82
|
};
|
package/dist/accept-terms.js
CHANGED
|
@@ -14,16 +14,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
var DEFAULT_AGE_RESTRICTION = '16';
|
|
15
15
|
var DEFAULT_PRIVACY_POLICIES_POSITION = 'top';
|
|
16
16
|
function AcceptTerms(_ref) {
|
|
17
|
-
var _ref$
|
|
18
|
-
|
|
19
|
-
_ref$isAuthFirstPayme = _ref.isAuthFirstPayment,
|
|
20
|
-
isAuthFirstPayment = _ref$isAuthFirstPayme === void 0 ? false : _ref$isAuthFirstPayme,
|
|
17
|
+
var _ref$withPrivacyPolic = _ref.withPrivacyPolicyTerms,
|
|
18
|
+
withPrivacyPolicyTerms = _ref$withPrivacyPolic === void 0 ? false : _ref$withPrivacyPolic,
|
|
21
19
|
_ref$hasError = _ref.hasError,
|
|
22
20
|
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
23
21
|
_ref$isSignup = _ref.isSignup,
|
|
24
22
|
isSignup = _ref$isSignup === void 0 ? false : _ref$isSignup,
|
|
25
|
-
_ref$isRegister = _ref.isRegister,
|
|
26
|
-
isRegister = _ref$isRegister === void 0 ? false : _ref$isRegister,
|
|
27
23
|
_ref$isChecked = _ref.isChecked,
|
|
28
24
|
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
29
25
|
_ref$isB2b = _ref.isB2b,
|
|
@@ -44,8 +40,6 @@ function AcceptTerms(_ref) {
|
|
|
44
40
|
transitionType = _ref$transitionType === void 0 ? null : _ref$transitionType,
|
|
45
41
|
_ref$isPrintProduct = _ref.isPrintProduct,
|
|
46
42
|
isPrintProduct = _ref$isPrintProduct === void 0 ? false : _ref$isPrintProduct,
|
|
47
|
-
_ref$specialTerms = _ref.specialTerms,
|
|
48
|
-
specialTerms = _ref$specialTerms === void 0 ? null : _ref$specialTerms,
|
|
49
43
|
_ref$isSingleTerm = _ref.isSingleTerm,
|
|
50
44
|
isSingleTerm = _ref$isSingleTerm === void 0 ? false : _ref$isSingleTerm,
|
|
51
45
|
_ref$isDeferredBillin = _ref.isDeferredBilling,
|
|
@@ -55,14 +49,12 @@ function AcceptTerms(_ref) {
|
|
|
55
49
|
children = _ref.children,
|
|
56
50
|
_ref$privacyPoliciesP = _ref.privacyPoliciesPosition,
|
|
57
51
|
privacyPoliciesPosition = _ref$privacyPoliciesP === void 0 ? DEFAULT_PRIVACY_POLICIES_POSITION : _ref$privacyPoliciesP;
|
|
58
|
-
var divProps = _objectSpread(
|
|
52
|
+
var divProps = _objectSpread({
|
|
59
53
|
id: 'acceptTermsField',
|
|
60
54
|
className: 'o-forms-field o-layout-typography ncf__validation-error',
|
|
61
55
|
'data-validate': 'required,checked'
|
|
62
56
|
}, isSignup && {
|
|
63
57
|
'data-trackable': 'sign-up-terms'
|
|
64
|
-
}), isRegister && {
|
|
65
|
-
'data-trackable': 'register-up-terms'
|
|
66
58
|
});
|
|
67
59
|
var labelClassName = (0, _classnames["default"])(['o-forms-input', 'o-forms-input--checkbox', {
|
|
68
60
|
'o-forms-input--invalid': hasError
|
|
@@ -78,8 +70,8 @@ function AcceptTerms(_ref) {
|
|
|
78
70
|
}, isChecked && {
|
|
79
71
|
defaultChecked: true
|
|
80
72
|
});
|
|
81
|
-
var
|
|
82
|
-
className: "
|
|
73
|
+
var privacyPolicyTerms = /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
+
className: "privacy-policy-terms"
|
|
83
75
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
76
|
className: "consent-text--".concat(privacyPoliciesPosition)
|
|
85
77
|
}, "For more information about how we use your data, please refer to our", ' ', /*#__PURE__*/_react["default"].createElement("a", {
|
|
@@ -110,20 +102,6 @@ function AcceptTerms(_ref) {
|
|
|
110
102
|
}, "Please accept our terms & conditions")), children && /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
103
|
className: "children-container"
|
|
112
104
|
}, children));
|
|
113
|
-
var registerTerms = /*#__PURE__*/_react["default"].createElement("label", {
|
|
114
|
-
className: labelClassName,
|
|
115
|
-
htmlFor: "termsAcceptance"
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement("input", inputProps), /*#__PURE__*/_react["default"].createElement("span", {
|
|
117
|
-
className: "o-forms-input__label terms-register"
|
|
118
|
-
}, "I confirm I am ", ageRestriction, " years or older and have read and agree to the", ' ', /*#__PURE__*/_react["default"].createElement("a", {
|
|
119
|
-
className: "ncf__link--external",
|
|
120
|
-
href: "http://help.ft.com/help/legal-privacy/terms-conditions/",
|
|
121
|
-
target: isEmbedded ? '_top' : '_blank',
|
|
122
|
-
rel: "noopener noreferrer",
|
|
123
|
-
"data-trackable": "terms-and-conditions"
|
|
124
|
-
}, "Terms & Conditions"), "."), /*#__PURE__*/_react["default"].createElement("p", {
|
|
125
|
-
className: "o-forms-input__error"
|
|
126
|
-
}, "Please accept our terms & conditions"));
|
|
127
105
|
var b2bTerms = isB2b ? /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
128
106
|
className: "terms-b2b"
|
|
129
107
|
}, "By submitting this form, you indicate your consent to also being contacted by Financial Times by email, post, or phone about our other products, services or special offers unless you untick this box.")) : /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -189,9 +167,7 @@ function AcceptTerms(_ref) {
|
|
|
189
167
|
href: "https://help.ft.com/legal-privacy/terms-and-conditions/",
|
|
190
168
|
target: isEmbedded ? '_top' : '_blank',
|
|
191
169
|
rel: "noopener noreferrer"
|
|
192
|
-
}, "Terms & Conditions"), ".")))
|
|
193
|
-
className: "terms-special"
|
|
194
|
-
}, specialTerms)));
|
|
170
|
+
}, "Terms & Conditions"), "."))));
|
|
195
171
|
var deferredBillingTerms = isDeferredBilling && /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
196
172
|
className: "terms-deferred"
|
|
197
173
|
}, "Please note if you fail to make payment for your deferred billing plan within due date your subscription will be automatically cancelled."));
|
|
@@ -208,9 +184,9 @@ function AcceptTerms(_ref) {
|
|
|
208
184
|
}, "Terms & Conditions"), "."), /*#__PURE__*/_react["default"].createElement("p", {
|
|
209
185
|
className: "o-forms-input__error"
|
|
210
186
|
}, "Please accept our terms & conditions"));
|
|
211
|
-
return /*#__PURE__*/_react["default"].createElement("div", divProps, isB2cPartnership ? b2cPartnershipTerms :
|
|
187
|
+
return /*#__PURE__*/_react["default"].createElement("div", divProps, isB2cPartnership ? b2cPartnershipTerms : withPrivacyPolicyTerms ? privacyPolicyTerms : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
212
188
|
className: "o-typography-list ncf__accept-terms-list"
|
|
213
|
-
},
|
|
189
|
+
}, b2bTerms, corpSignupTerms, transitionTerms, signupTerms, deferredBillingTerms), /*#__PURE__*/_react["default"].createElement("label", {
|
|
214
190
|
className: labelClassName,
|
|
215
191
|
htmlFor: "termsAcceptance"
|
|
216
192
|
}, /*#__PURE__*/_react["default"].createElement("input", inputProps), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -220,9 +196,9 @@ function AcceptTerms(_ref) {
|
|
|
220
196
|
}, "Please accept our terms & conditions"))));
|
|
221
197
|
}
|
|
222
198
|
AcceptTerms.propTypes = {
|
|
199
|
+
withPrivacyPolicyTerms: _propTypes["default"].bool,
|
|
223
200
|
hasError: _propTypes["default"].bool,
|
|
224
201
|
isSignup: _propTypes["default"].bool,
|
|
225
|
-
isRegister: _propTypes["default"].bool,
|
|
226
202
|
isChecked: _propTypes["default"].bool,
|
|
227
203
|
isB2b: _propTypes["default"].bool,
|
|
228
204
|
isB2cPartnership: _propTypes["default"].bool,
|
|
@@ -233,7 +209,6 @@ AcceptTerms.propTypes = {
|
|
|
233
209
|
isTransition: _propTypes["default"].bool,
|
|
234
210
|
transitionType: _propTypes["default"].string,
|
|
235
211
|
isPrintProduct: _propTypes["default"].bool,
|
|
236
|
-
specialTerms: _propTypes["default"].string,
|
|
237
212
|
isSingleTerm: _propTypes["default"].bool,
|
|
238
213
|
isDeferredBilling: _propTypes["default"].bool,
|
|
239
214
|
hideConfirmTermsAndConditions: _propTypes["default"].bool,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/n-conversion-forms",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.10.0",
|
|
4
4
|
"description": "Containing jsx components and styles for forms included on Accounts and Acqusition apps (next-signup, next-profile, next-retention, etc).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|