bhl-forms 0.6.15 → 0.7.1
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/dist/bhl-forms.es.js +1757 -1759
- package/dist/bhl-forms.iife.js +4 -4
- package/dist/bhl-forms.modern.es.js +2804 -2811
- package/dist/bhl-forms.modern.iife.js +6 -6
- package/dist/bhl-forms.modern.umd.js +6 -6
- package/dist/bhl-forms.umd.js +4 -4
- package/dist/forms/accidentsAndInjuries.es.js +314 -228
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +16 -7
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/business.es.js +317 -236
- package/dist/forms/business.iife.js +1 -1
- package/dist/forms/business.json +1 -1
- package/dist/forms/childAndFamily.es.js +303 -224
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +643 -555
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +637 -551
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +16 -7
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/contracts.es.js +307 -227
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +660 -572
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/divorce.es.js +643 -555
- package/dist/forms/divorce.iife.js +1 -1
- package/dist/forms/divorce.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +584 -506
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalHomeImprovement.es.js +3015 -0
- package/dist/forms/generalHomeImprovement.iife.js +1 -0
- package/dist/forms/generalHomeImprovement.json +1 -0
- package/dist/forms/generalLegal.es.js +341 -244
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalJustAnswer.es.js +4542 -0
- package/dist/forms/generalLegalJustAnswer.iife.js +1 -0
- package/dist/forms/generalLegalJustAnswer.json +1 -0
- package/dist/forms/generalLegalPopUnder.es.js +342 -245
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderSingle.es.js +692 -612
- package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
- package/dist/forms/generalLegalPopUnderSingle.json +1 -1
- package/dist/forms/generalLegalSingle.es.js +692 -612
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +204 -158
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/generalLegalThankYouConsultation.es.js +692 -612
- package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
- package/dist/forms/generalLegalThankYouConsultation.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +303 -224
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/landlordTenant.es.js +316 -240
- package/dist/forms/landlordTenant.iife.js +1 -1
- package/dist/forms/landlordTenant.json +1 -1
- package/dist/forms/malpractice.es.js +308 -227
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +184 -166
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/mechanics.json +1 -1
- package/dist/forms/patentsAndIP.es.js +646 -558
- package/dist/forms/patentsAndIP.iife.js +1 -1
- package/dist/forms/patentsAndIP.json +1 -1
- package/dist/forms/realEstate.es.js +339 -243
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +307 -227
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +156 -140
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +69 -51
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/testRedirects.es.js +43 -22
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/testRedirects.json +1 -1
- package/dist/forms/vets.es.js +16 -7
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/willsAndTrusts.es.js +304 -223
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/package.json +3 -3
|
@@ -6,14 +6,97 @@ function LegalRedirectUrl() {
|
|
|
6
6
|
return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
9
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
|
|
10
|
+
const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
|
|
11
|
+
const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
|
|
12
|
+
const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
|
|
13
|
+
const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
|
|
14
|
+
const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
|
|
15
|
+
const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
|
|
16
|
+
const defaultLegalImprovementCrossSells = {
|
|
17
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
18
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
19
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
20
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
21
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
22
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
23
|
+
};
|
|
24
|
+
const CROSS_SELL_OPTION_MAP_LEGAL = {
|
|
25
|
+
// Values can be a list or a map of value -> display value
|
|
26
|
+
'Auto and Car Accidents': {
|
|
27
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
28
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
29
|
+
'Workers Compensation': 'Workplace Injury',
|
|
30
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
31
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
32
|
+
'Child Custody': 'Need help with Child Custody',
|
|
33
|
+
},
|
|
34
|
+
"Personal Injury": {
|
|
35
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
36
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
37
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
38
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
39
|
+
'Child Custody': 'Need help with Child Custody',
|
|
40
|
+
// TODO add one more?
|
|
41
|
+
},
|
|
42
|
+
"Workers Compensation": {
|
|
43
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
44
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
45
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
46
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
47
|
+
'Child Custody': 'Need help with Child Custody',
|
|
48
|
+
// TODO add one more?
|
|
49
|
+
},
|
|
50
|
+
"DUI and DWI": {
|
|
51
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
52
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
53
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
54
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
55
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
56
|
+
'Child Custody': 'Need help with Child Custody',
|
|
57
|
+
},
|
|
58
|
+
"Wills and Trusts": {
|
|
59
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
60
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
61
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
62
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
63
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
64
|
+
'Child Custody': 'Need help with Child Custody',
|
|
65
|
+
},
|
|
66
|
+
"Probate and Estates": {
|
|
67
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
68
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
69
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
70
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
71
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
72
|
+
'Child Custody': 'Need help with Child Custody',
|
|
73
|
+
},
|
|
74
|
+
"Power of Attorney": {
|
|
75
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
76
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
77
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
78
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
79
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
80
|
+
'Child Custody': 'Need help with Child Custody',
|
|
81
|
+
},
|
|
82
|
+
"Long Term Disability": {
|
|
83
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
84
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
85
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
86
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
87
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
88
|
+
'Child Custody': 'Need help with Child Custody',
|
|
89
|
+
},
|
|
90
|
+
"Social Security Disability and Insurance": {
|
|
91
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
92
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
93
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
94
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
95
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
96
|
+
'Child Custody': 'Need help with Child Custody',
|
|
97
|
+
},
|
|
98
|
+
'*': defaultLegalImprovementCrossSells,
|
|
99
|
+
};
|
|
17
100
|
|
|
18
101
|
// ------ Common Base Settings
|
|
19
102
|
|
|
@@ -130,6 +213,15 @@ const sbsSelect = (updates) => {
|
|
|
130
213
|
return select(updates)
|
|
131
214
|
};
|
|
132
215
|
|
|
216
|
+
const verticalSelect = (updates) => {
|
|
217
|
+
updates.labelClass = 'required';
|
|
218
|
+
updates.wrapperClass = 't-flex t-justify-center';
|
|
219
|
+
updates.messagesClass = 't-flex t-justify-center';
|
|
220
|
+
updates.inputClass = 't-min-w-[150px] t-bg-white';
|
|
221
|
+
updates.helpClass = 't-mt-2.5 t-text-center';
|
|
222
|
+
return select(updates)
|
|
223
|
+
};
|
|
224
|
+
|
|
133
225
|
const text = (updates) => {
|
|
134
226
|
if (updates.name && !updates.id) {
|
|
135
227
|
updates.id = updates.name;
|
|
@@ -149,6 +241,14 @@ const sbsText = (updates) => {
|
|
|
149
241
|
return text(updates)
|
|
150
242
|
};
|
|
151
243
|
|
|
244
|
+
const verticalText = (updates) => {
|
|
245
|
+
updates.wrapperClass = 't-flex t-justify-center';
|
|
246
|
+
updates.messagesClass = 't-flex t-justify-center';
|
|
247
|
+
updates.inputClass = 't-text-center';
|
|
248
|
+
updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
|
|
249
|
+
return text(updates)
|
|
250
|
+
};
|
|
251
|
+
|
|
152
252
|
const textArea = (updates) => {
|
|
153
253
|
if (updates.name && !updates.id) {
|
|
154
254
|
updates.id = updates.name;
|
|
@@ -186,42 +286,131 @@ const sbsDate = (updates) => {
|
|
|
186
286
|
return date(updates)
|
|
187
287
|
};
|
|
188
288
|
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
name: '
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
"More than $100,000"
|
|
202
|
-
]
|
|
289
|
+
const email = (scope) => sbsText({
|
|
290
|
+
$formkit: 'email',
|
|
291
|
+
name: scope ? scope + ':' + 'Email' : 'Email',
|
|
292
|
+
label: 'Email Address:',
|
|
293
|
+
placeholder: 'email@domain.com',
|
|
294
|
+
autocomplete: 'email',
|
|
295
|
+
'data-tf-sensitive': 'false',
|
|
296
|
+
validation: 'required|email',
|
|
297
|
+
validationMessages: {
|
|
298
|
+
required: 'Email is required',
|
|
299
|
+
email: 'Invalid Email'
|
|
300
|
+
}
|
|
203
301
|
});
|
|
204
302
|
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
303
|
+
const firstName = (scope) => sbsText({
|
|
304
|
+
label: 'First Name:',
|
|
305
|
+
placeholder: 'First',
|
|
306
|
+
name: scope ? scope + ':' + 'First_Name' : 'First_Name',
|
|
307
|
+
autocomplete: "given-name",
|
|
308
|
+
validationMessages: {
|
|
309
|
+
required: 'First Name is required'
|
|
310
|
+
}
|
|
209
311
|
});
|
|
210
312
|
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
inputmode: "numeric",
|
|
217
|
-
validation: "required|min:18,max:65",
|
|
313
|
+
const lastName = (scope) => sbsText({
|
|
314
|
+
label: 'Last Name:',
|
|
315
|
+
placeholder: 'Last',
|
|
316
|
+
name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
|
|
317
|
+
autocomplete: "family-name",
|
|
218
318
|
validationMessages: {
|
|
219
|
-
required: '
|
|
220
|
-
min: 'Invalid Age - must be between 18 and 65',
|
|
221
|
-
max: 'Invalid Age - must be between 18 and 65',
|
|
319
|
+
required: 'Last Name is required'
|
|
222
320
|
}
|
|
223
321
|
});
|
|
224
322
|
|
|
323
|
+
const phone = (scope) => sbsText({
|
|
324
|
+
$formkit: 'tel',
|
|
325
|
+
name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
|
|
326
|
+
label: 'Phone Number:',
|
|
327
|
+
placeholder: '###-###-####',
|
|
328
|
+
maxlength: 12,
|
|
329
|
+
help: '10-digit phone number, hyphens optional',
|
|
330
|
+
autocomplete: 'tel-national',
|
|
331
|
+
'data-tf-sensitive': 'false',
|
|
332
|
+
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
333
|
+
validationMessages: {
|
|
334
|
+
required: 'Field is required',
|
|
335
|
+
matches: 'Invalid Phone Format, use ###-###-####',
|
|
336
|
+
valid_phone: 'Invalid Phone Number'
|
|
337
|
+
},
|
|
338
|
+
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
const zipcode = (scope, vertical, updates = {}) => {
|
|
343
|
+
const func = vertical ? verticalText : sbsText;
|
|
344
|
+
const label = vertical ? (updates.label) : 'Zip Code:';
|
|
345
|
+
const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
|
|
346
|
+
return func({
|
|
347
|
+
label,
|
|
348
|
+
help,
|
|
349
|
+
placeholder: '#####',
|
|
350
|
+
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
351
|
+
maxlength: 5,
|
|
352
|
+
inputmode: "numeric",
|
|
353
|
+
autocomplete: 'postal-code',
|
|
354
|
+
validation: 'required|matches:/^[0-9]{5}$/',
|
|
355
|
+
validationMessages: {
|
|
356
|
+
required: 'Zip Code is required',
|
|
357
|
+
matches: 'Invalid Zip Code'
|
|
358
|
+
},
|
|
359
|
+
...updates
|
|
360
|
+
})
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
const amountPaymentsPastDue = (scope, vertical, updates = {}) => {
|
|
364
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
365
|
+
const label = vertical ? (updates.label) : 'Total Amount of Payments that are Past Due:';
|
|
366
|
+
return func(merge({
|
|
367
|
+
label,
|
|
368
|
+
name: scope ? scope + ':' + 'Amount_Payments_Past_Due' : 'Amount_Payments_Past_Due',
|
|
369
|
+
options: [
|
|
370
|
+
"$0 - $499",
|
|
371
|
+
"$500 - $999",
|
|
372
|
+
"$1,000 - $2,499",
|
|
373
|
+
"$2,500 - $4,999",
|
|
374
|
+
"$5,000 - $9,999",
|
|
375
|
+
"$10,000 - $24,999",
|
|
376
|
+
"$25,000 - $49,999",
|
|
377
|
+
"$50,000 - $99,999",
|
|
378
|
+
"More than $100,000"
|
|
379
|
+
]
|
|
380
|
+
}, updates))
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
const applicantOccupation = (scope, vertical, updates = {}) => {
|
|
384
|
+
const func = vertical ? verticalText : sbsText;
|
|
385
|
+
const label = vertical ? (updates.label) : "What is the Applicant's Occupation?";
|
|
386
|
+
return func(merge({
|
|
387
|
+
label,
|
|
388
|
+
placeholder: "Occupation",
|
|
389
|
+
name: scope ? scope + ':' + 'Applicant_Occupation' : 'Applicant_Occupation',
|
|
390
|
+
}, updates))
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
const applicantAge = (scope, vertical, updates = {}) => {
|
|
394
|
+
const func = vertical ? verticalText : sbsText;
|
|
395
|
+
const label = vertical ? (updates.label) : 'Age of Applicant?';
|
|
396
|
+
const value = vertical ? (updates.value ?? "50") : null;
|
|
397
|
+
return func(merge({
|
|
398
|
+
label,
|
|
399
|
+
placeholder: 'Age between 18 and 65',
|
|
400
|
+
name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
|
|
401
|
+
value,
|
|
402
|
+
maxlength: 2,
|
|
403
|
+
inputmode: "numeric",
|
|
404
|
+
validation: "required|min:18,max:65",
|
|
405
|
+
validationMessages: {
|
|
406
|
+
required: 'Applicant Age is required',
|
|
407
|
+
min: 'Invalid Age - must be between 18 and 65',
|
|
408
|
+
max: 'Invalid Age - must be between 18 and 65',
|
|
409
|
+
},
|
|
410
|
+
...updates
|
|
411
|
+
}))
|
|
412
|
+
};
|
|
413
|
+
|
|
225
414
|
const applicantDisabilityHowObtain = (scope) => sbsSelect({
|
|
226
415
|
name: scope ? scope + ':' + 'Applicant_Disability_How_Obtain' : 'Applicant_Disability_How_Obtain',
|
|
227
416
|
label: 'How Did Applicant Obtain the Disability Policy?',
|
|
@@ -736,20 +925,6 @@ const driversLicenseType = () => sbs2ItemRadio({
|
|
|
736
925
|
]
|
|
737
926
|
});
|
|
738
927
|
|
|
739
|
-
const email = (scope) => sbsText({
|
|
740
|
-
$formkit: 'email',
|
|
741
|
-
name: scope ? scope + ':' + 'Email' : 'Email',
|
|
742
|
-
label: 'Email Address:',
|
|
743
|
-
placeholder: 'email@domain.com',
|
|
744
|
-
autocomplete: 'email',
|
|
745
|
-
'data-tf-sensitive': 'false',
|
|
746
|
-
validation: 'required|email',
|
|
747
|
-
validationMessages: {
|
|
748
|
-
required: 'Email is required',
|
|
749
|
-
email: 'Invalid Email'
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
|
|
753
928
|
const employerType = () => sbsSelect({
|
|
754
929
|
label: 'The Employer Is a:',
|
|
755
930
|
name: 'Employer_Type',
|
|
@@ -798,16 +973,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
|
|
|
798
973
|
]
|
|
799
974
|
});
|
|
800
975
|
|
|
801
|
-
const firstName = (scope) => sbsText({
|
|
802
|
-
$formkit: 'text',
|
|
803
|
-
label: 'First Name:',
|
|
804
|
-
placeholder: 'First',
|
|
805
|
-
name: scope ? scope + ':' + 'First_Name' : 'First_Name',
|
|
806
|
-
autocomplete: "given-name",
|
|
807
|
-
validationMessages: {
|
|
808
|
-
required: 'First Name is required'
|
|
809
|
-
}
|
|
810
|
-
});
|
|
811
976
|
|
|
812
977
|
const TOLPOptions = [
|
|
813
978
|
'Adoption',
|
|
@@ -955,17 +1120,6 @@ const incidentDate = (scope) => sbsDate({
|
|
|
955
1120
|
label: 'Date of Incident:',
|
|
956
1121
|
});
|
|
957
1122
|
|
|
958
|
-
const lastName = (scope) => sbsText({
|
|
959
|
-
$formkit: 'text',
|
|
960
|
-
label: 'Last Name:',
|
|
961
|
-
placeholder: 'Last',
|
|
962
|
-
name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
|
|
963
|
-
autocomplete: "family-name",
|
|
964
|
-
validationMessages: {
|
|
965
|
-
required: 'Last Name is required'
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
|
|
969
1123
|
const landlordTenantParty = () => sbsSelect({
|
|
970
1124
|
label: 'I am the:',
|
|
971
1125
|
name: 'Landlord_Tenant_Party',
|
|
@@ -1024,69 +1178,7 @@ const legalCrossSells$1 = () => col2Checkbox({
|
|
|
1024
1178
|
help: 'Just hit "Next" if none apply',
|
|
1025
1179
|
helpClass: 't-text-center !t-text-sm',
|
|
1026
1180
|
validation: null,
|
|
1027
|
-
options:
|
|
1028
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
|
|
1029
|
-
then: {
|
|
1030
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
1031
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
1032
|
-
'Workers Compensation': 'Workplace Injury',
|
|
1033
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
1034
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
1035
|
-
'Child Custody': 'Need help with Child Custody',
|
|
1036
|
-
},
|
|
1037
|
-
else: {
|
|
1038
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
|
|
1039
|
-
then: {
|
|
1040
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
1041
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
1042
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
1043
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
1044
|
-
'Child Custody': 'Need help with Child Custody',
|
|
1045
|
-
// TODO add one more?
|
|
1046
|
-
},
|
|
1047
|
-
else: {
|
|
1048
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
|
|
1049
|
-
then: {
|
|
1050
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
1051
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
1052
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
1053
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
1054
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
1055
|
-
'Child Custody': 'Need help with Child Custody',
|
|
1056
|
-
},
|
|
1057
|
-
else: {
|
|
1058
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Wills and Trusts" || $getVal($get(form), "Type_Of_Legal_Problem") === "Probate and Estates" || $getVal($get(form), "Type_Of_Legal_Problem") === "Power of Attorney"',
|
|
1059
|
-
then: {
|
|
1060
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
1061
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
1062
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
1063
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
1064
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
1065
|
-
'Child Custody': 'Need help with Child Custody',
|
|
1066
|
-
},
|
|
1067
|
-
else: {
|
|
1068
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
|
|
1069
|
-
then: {
|
|
1070
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
1071
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
1072
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
1073
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
1074
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
1075
|
-
'Child Custody': 'Need help with Child Custody',
|
|
1076
|
-
},
|
|
1077
|
-
else: {
|
|
1078
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
1079
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
1080
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
1081
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
1082
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
1083
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1181
|
+
options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
|
|
1090
1182
|
});
|
|
1091
1183
|
|
|
1092
1184
|
const loanAmount = () => sbsSelect({
|
|
@@ -1183,24 +1275,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
|
|
|
1183
1275
|
label: 'Do you currently have any pending charges?'
|
|
1184
1276
|
});
|
|
1185
1277
|
|
|
1186
|
-
const phone = (scope) => sbsText({
|
|
1187
|
-
$formkit: 'tel',
|
|
1188
|
-
name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
|
|
1189
|
-
label: 'Phone Number:',
|
|
1190
|
-
placeholder: '###-###-####',
|
|
1191
|
-
maxlength: 12,
|
|
1192
|
-
help: '10-digit phone number, hyphens optional',
|
|
1193
|
-
autocomplete: 'tel-national',
|
|
1194
|
-
'data-tf-sensitive': 'false',
|
|
1195
|
-
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
1196
|
-
validationMessages: {
|
|
1197
|
-
required: 'Field is required',
|
|
1198
|
-
matches: 'Invalid Phone Format, use ###-###-####',
|
|
1199
|
-
valid_phone: 'Invalid Phone Number'
|
|
1200
|
-
},
|
|
1201
|
-
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
1202
|
-
});
|
|
1203
|
-
|
|
1204
1278
|
const primaryInjury = (scope) => sbs2ColRadio({
|
|
1205
1279
|
name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
|
|
1206
1280
|
label: 'Primary Injury:',
|
|
@@ -1467,21 +1541,6 @@ const wouldLikeLawyerTo = () => sbsRadio({
|
|
|
1467
1541
|
]
|
|
1468
1542
|
});
|
|
1469
1543
|
|
|
1470
|
-
const zipcode = (scope) => sbsText({
|
|
1471
|
-
label: 'Zip Code:',
|
|
1472
|
-
placeholder: '#####',
|
|
1473
|
-
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
1474
|
-
maxlength: 5,
|
|
1475
|
-
inputmode: "numeric",
|
|
1476
|
-
autocomplete: 'postal-code',
|
|
1477
|
-
validation: 'required|matches:/^[0-9]{5}$/',
|
|
1478
|
-
validationMessages: {
|
|
1479
|
-
required: 'Zip Code is required',
|
|
1480
|
-
matches: 'Invalid Zip Code'
|
|
1481
|
-
}
|
|
1482
|
-
});
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
1544
|
// ------ Question Groups
|
|
1486
1545
|
|
|
1487
1546
|
// NOTE: name must be unique within a form!
|
|
@@ -2340,13 +2399,20 @@ function crossSellQuestionsStepSubHeadline(updates) {
|
|
|
2340
2399
|
function commentsStepHeadline(updates) {
|
|
2341
2400
|
return {
|
|
2342
2401
|
$el: 'h3',
|
|
2343
|
-
children: updates.headline || 'Additional
|
|
2402
|
+
children: updates.headline || 'Additional Details',
|
|
2344
2403
|
attrs: {
|
|
2345
2404
|
class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
|
|
2346
2405
|
}
|
|
2347
2406
|
}
|
|
2348
2407
|
}
|
|
2349
2408
|
|
|
2409
|
+
function commentsStepHeadlineLegal(updates) {
|
|
2410
|
+
return commentsStepHeadline({
|
|
2411
|
+
headline: updates.headline || 'Additional Case Details',
|
|
2412
|
+
headlineClass: updates.headlineClass
|
|
2413
|
+
})
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2350
2416
|
function firstAndLastStepHeadline(updates) {
|
|
2351
2417
|
return {
|
|
2352
2418
|
$el: 'h3',
|
|
@@ -2370,7 +2436,7 @@ function legalCrossSellsStepHeadline(updates) {
|
|
|
2370
2436
|
function contactStepHeadline(updates) {
|
|
2371
2437
|
return {
|
|
2372
2438
|
$el: 'h3',
|
|
2373
|
-
children: updates.headline ||
|
|
2439
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
|
|
2374
2440
|
attrs: {
|
|
2375
2441
|
class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
|
|
2376
2442
|
}
|
|
@@ -2380,7 +2446,7 @@ function contactStepHeadline(updates) {
|
|
|
2380
2446
|
function contactStepSubHeadline(updates) {
|
|
2381
2447
|
return {
|
|
2382
2448
|
$el: 'h5',
|
|
2383
|
-
children: updates.subheadline ||
|
|
2449
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
|
|
2384
2450
|
attrs: {
|
|
2385
2451
|
class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
|
|
2386
2452
|
}
|
|
@@ -2420,10 +2486,16 @@ const stepDefaults = (step, stepKey) => ({
|
|
|
2420
2486
|
}
|
|
2421
2487
|
});
|
|
2422
2488
|
|
|
2423
|
-
function step(name, inputs,
|
|
2424
|
-
|
|
2425
|
-
nextOnEnter = true
|
|
2426
|
-
|
|
2489
|
+
function step(name, inputs, updates = {}) {
|
|
2490
|
+
const {
|
|
2491
|
+
nextOnEnter = true,
|
|
2492
|
+
nextOnInput = false,
|
|
2493
|
+
stepKey = undefined,
|
|
2494
|
+
nextStepMap = undefined,
|
|
2495
|
+
triggerRedirectMap = undefined,
|
|
2496
|
+
autoFocus = undefined,
|
|
2497
|
+
} = updates;
|
|
2498
|
+
|
|
2427
2499
|
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
2428
2500
|
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
2429
2501
|
if (lastInput && nextOnEnter === true) {
|
|
@@ -2443,6 +2515,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
2443
2515
|
id: name,
|
|
2444
2516
|
name: name,
|
|
2445
2517
|
nextStepMap: nextStepMap,
|
|
2518
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
2446
2519
|
autoFocus: autoFocus,
|
|
2447
2520
|
children: inputs
|
|
2448
2521
|
}
|
|
@@ -2451,6 +2524,34 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
2451
2524
|
)
|
|
2452
2525
|
}
|
|
2453
2526
|
|
|
2527
|
+
function contactInfo(updates = {}) {
|
|
2528
|
+
return step(
|
|
2529
|
+
'contactInfo',
|
|
2530
|
+
[
|
|
2531
|
+
contactStepHeadline(updates),
|
|
2532
|
+
contactStepSubHeadline(updates),
|
|
2533
|
+
trustedFormScript(),
|
|
2534
|
+
email(updates.scope),
|
|
2535
|
+
phone(updates.scope),
|
|
2536
|
+
TCPAConsent(updates.scope),
|
|
2537
|
+
secureIcon()
|
|
2538
|
+
],
|
|
2539
|
+
{ nextOnEnter: false }
|
|
2540
|
+
)
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
function firstAndLastV2(updates = {}) {
|
|
2544
|
+
return step(
|
|
2545
|
+
'firstAndLast',
|
|
2546
|
+
[
|
|
2547
|
+
firstAndLastStepHeadline(updates),
|
|
2548
|
+
firstName(),
|
|
2549
|
+
lastName()
|
|
2550
|
+
],
|
|
2551
|
+
updates
|
|
2552
|
+
)
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2454
2555
|
function generalLegalTOLPAndZip(updates = {}) {
|
|
2455
2556
|
return step(
|
|
2456
2557
|
'generalLegalTOLPAndZip',
|
|
@@ -2464,10 +2565,7 @@ function generalLegalTOLPAndZip(updates = {}) {
|
|
|
2464
2565
|
realEstateTOLPDisplay(),
|
|
2465
2566
|
zipcode()
|
|
2466
2567
|
],
|
|
2467
|
-
updates
|
|
2468
|
-
updates.nextOnInput,
|
|
2469
|
-
updates.stepKey,
|
|
2470
|
-
updates.nextStepMap
|
|
2568
|
+
updates
|
|
2471
2569
|
)
|
|
2472
2570
|
}
|
|
2473
2571
|
|
|
@@ -2475,10 +2573,10 @@ function commentsWithBankruptcy(updates = {}) {
|
|
|
2475
2573
|
return step(
|
|
2476
2574
|
'commentsWithBankruptcy',
|
|
2477
2575
|
[
|
|
2478
|
-
|
|
2576
|
+
commentsStepHeadlineLegal(updates),
|
|
2479
2577
|
comments({
|
|
2480
|
-
label: typeof updates.label === 'undefined' ?
|
|
2481
|
-
placeholder: updates.placeholder ||
|
|
2578
|
+
label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
|
|
2579
|
+
placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
2482
2580
|
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
|
|
2483
2581
|
}, updates.scope),
|
|
2484
2582
|
// TODO: needs scope support
|
|
@@ -2495,39 +2593,10 @@ function commentsWithBankruptcy(updates = {}) {
|
|
|
2495
2593
|
],
|
|
2496
2594
|
}
|
|
2497
2595
|
],
|
|
2498
|
-
false
|
|
2499
|
-
)
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
function contactInfo(updates = {}) {
|
|
2503
|
-
return step(
|
|
2504
|
-
'contactInfo',
|
|
2505
|
-
[
|
|
2506
|
-
contactStepHeadline(updates),
|
|
2507
|
-
contactStepSubHeadline(updates),
|
|
2508
|
-
trustedFormScript(),
|
|
2509
|
-
email(updates.scope),
|
|
2510
|
-
phone(updates.scope),
|
|
2511
|
-
TCPAConsent(updates.scope),
|
|
2512
|
-
secureIcon()
|
|
2513
|
-
],
|
|
2514
|
-
false, // nextOnEnter
|
|
2515
|
-
)
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
function firstAndLastV2(updates = {}) {
|
|
2519
|
-
return step(
|
|
2520
|
-
'firstAndLast',
|
|
2521
|
-
[
|
|
2522
|
-
firstAndLastStepHeadline(updates),
|
|
2523
|
-
firstName(),
|
|
2524
|
-
lastName()
|
|
2525
|
-
],
|
|
2526
|
-
updates.nextOnEnter
|
|
2596
|
+
{ nextOnEnter: false }
|
|
2527
2597
|
)
|
|
2528
2598
|
}
|
|
2529
2599
|
|
|
2530
|
-
|
|
2531
2600
|
const AllTOLPQuestions = () => {
|
|
2532
2601
|
return [
|
|
2533
2602
|
AdoptionQuestions(),
|
|
@@ -2598,11 +2667,10 @@ function generalLegalTOLPQuestions(updates = {}) {
|
|
|
2598
2667
|
return step(
|
|
2599
2668
|
'TOLPQuestions',
|
|
2600
2669
|
questions,
|
|
2601
|
-
updates
|
|
2670
|
+
updates
|
|
2602
2671
|
)
|
|
2603
2672
|
}
|
|
2604
2673
|
|
|
2605
|
-
|
|
2606
2674
|
function autoAndCarAccidentCrossSellQuestions(updates = {}) {
|
|
2607
2675
|
return step(
|
|
2608
2676
|
'autoAndCarAccidentCrossSellQuestions',
|
|
@@ -2619,7 +2687,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
|
|
|
2619
2687
|
'CrossSell:Auto_and_Car_Accidents'
|
|
2620
2688
|
)
|
|
2621
2689
|
],
|
|
2622
|
-
updates
|
|
2690
|
+
updates
|
|
2623
2691
|
)
|
|
2624
2692
|
}
|
|
2625
2693
|
|
|
@@ -2638,7 +2706,7 @@ function childCustodyCrossSellQuestions(updates = {}) {
|
|
|
2638
2706
|
'CrossSell:Child_Custody'
|
|
2639
2707
|
)
|
|
2640
2708
|
],
|
|
2641
|
-
updates
|
|
2709
|
+
updates
|
|
2642
2710
|
)
|
|
2643
2711
|
}
|
|
2644
2712
|
|
|
@@ -2657,7 +2725,7 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
|
|
|
2657
2725
|
'CrossSell:Divorce_and_Separation'
|
|
2658
2726
|
)
|
|
2659
2727
|
],
|
|
2660
|
-
updates
|
|
2728
|
+
updates
|
|
2661
2729
|
)
|
|
2662
2730
|
}
|
|
2663
2731
|
|
|
@@ -2676,7 +2744,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
|
|
|
2676
2744
|
'CrossSell:DUI_and_DWI'
|
|
2677
2745
|
)
|
|
2678
2746
|
],
|
|
2679
|
-
updates
|
|
2747
|
+
updates
|
|
2680
2748
|
)
|
|
2681
2749
|
}
|
|
2682
2750
|
|
|
@@ -2696,7 +2764,7 @@ function ssdiCrossSellQuestions(updates = {}) {
|
|
|
2696
2764
|
'CrossSell:Social_Security_Disability_and_Insurance'
|
|
2697
2765
|
)
|
|
2698
2766
|
],
|
|
2699
|
-
updates
|
|
2767
|
+
updates
|
|
2700
2768
|
)
|
|
2701
2769
|
}
|
|
2702
2770
|
|
|
@@ -2716,7 +2784,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
|
|
|
2716
2784
|
'CrossSell:Personal_Injury'
|
|
2717
2785
|
)
|
|
2718
2786
|
],
|
|
2719
|
-
updates
|
|
2787
|
+
updates
|
|
2720
2788
|
)
|
|
2721
2789
|
}
|
|
2722
2790
|
|
|
@@ -2735,7 +2803,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
|
|
|
2735
2803
|
'CrossSell:Power_of_Attorney'
|
|
2736
2804
|
)
|
|
2737
2805
|
],
|
|
2738
|
-
updates
|
|
2806
|
+
updates
|
|
2739
2807
|
)
|
|
2740
2808
|
}
|
|
2741
2809
|
|
|
@@ -2754,7 +2822,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
|
|
|
2754
2822
|
'CrossSell:Wills_and_Trusts'
|
|
2755
2823
|
)
|
|
2756
2824
|
],
|
|
2757
|
-
updates
|
|
2825
|
+
updates
|
|
2758
2826
|
)
|
|
2759
2827
|
}
|
|
2760
2828
|
|
|
@@ -2774,21 +2842,20 @@ function workersCompensationCrossSellQuestions(updates = {}) {
|
|
|
2774
2842
|
'CrossSell:Workers_Compensation'
|
|
2775
2843
|
)
|
|
2776
2844
|
],
|
|
2777
|
-
updates
|
|
2845
|
+
updates
|
|
2778
2846
|
)
|
|
2779
2847
|
}
|
|
2780
2848
|
|
|
2781
2849
|
function legalCrossSells(updates = {}) {
|
|
2850
|
+
updates.nextOnInput = false;
|
|
2851
|
+
updates.stepKey = '$get(Type_Of_Legal_Problem).value';
|
|
2782
2852
|
return step(
|
|
2783
2853
|
'legalCrossSells',
|
|
2784
2854
|
[
|
|
2785
2855
|
legalCrossSellsStepHeadline(updates),
|
|
2786
2856
|
legalCrossSells$1(),
|
|
2787
2857
|
],
|
|
2788
|
-
updates
|
|
2789
|
-
false,
|
|
2790
|
-
// Note: we should probably scope this stepKey to this step name
|
|
2791
|
-
'$get(Type_Of_Legal_Problem).value'
|
|
2858
|
+
updates
|
|
2792
2859
|
)
|
|
2793
2860
|
}
|
|
2794
2861
|
|
|
@@ -2931,9 +2998,7 @@ function formProps(updates) {
|
|
|
2931
2998
|
return props
|
|
2932
2999
|
}
|
|
2933
3000
|
|
|
2934
|
-
const metaDefaults = {
|
|
2935
|
-
tcpaLanguage: TCPA_LANGUAGE
|
|
2936
|
-
};
|
|
3001
|
+
const metaDefaults = {};
|
|
2937
3002
|
|
|
2938
3003
|
function metaProps(updates) {
|
|
2939
3004
|
const data = merge(
|
|
@@ -2946,7 +3011,7 @@ function metaProps(updates) {
|
|
|
2946
3011
|
}
|
|
2947
3012
|
}
|
|
2948
3013
|
|
|
2949
|
-
function
|
|
3014
|
+
function defaultMetaPropsLegal(tolps = null) {
|
|
2950
3015
|
let commentsPlaceholders = TOLPCommentsPlaceholders;
|
|
2951
3016
|
let finalHeadlines = TOLPFinalHeadlines;
|
|
2952
3017
|
let finalSubHeadlines = TOLPFinalSubHeadlines;
|
|
@@ -2956,23 +3021,27 @@ function defaultMetaProps(tolps = null) {
|
|
|
2956
3021
|
finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
|
|
2957
3022
|
}
|
|
2958
3023
|
return metaProps({
|
|
2959
|
-
|
|
3024
|
+
tcpaLanguage: TCPA_LANGUAGE_LEGAL,
|
|
3025
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
2960
3026
|
commentsPlaceholders: commentsPlaceholders,
|
|
2961
|
-
defaultFinalHeadline:
|
|
3027
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
|
|
2962
3028
|
finalHeadlines: finalHeadlines,
|
|
2963
|
-
defaultFinalSubHeadline:
|
|
2964
|
-
finalSubHeadlines: finalSubHeadlines
|
|
3029
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
|
|
3030
|
+
finalSubHeadlines: finalSubHeadlines
|
|
2965
3031
|
})
|
|
2966
3032
|
}
|
|
2967
3033
|
|
|
2968
3034
|
function defaultMetaPropsLegalLegacy() {
|
|
2969
|
-
const meta =
|
|
3035
|
+
const meta = defaultMetaPropsLegal();
|
|
2970
3036
|
meta.data.dynamicSchema = [
|
|
2971
3037
|
generalLegalTOLPQuestions(),
|
|
2972
3038
|
commentsWithBankruptcy({
|
|
2973
3039
|
inputClass: '!t-h-28',
|
|
2974
3040
|
}),
|
|
2975
|
-
legalCrossSells(
|
|
3041
|
+
legalCrossSells({
|
|
3042
|
+
headlineClass: '!t-text-dark',
|
|
3043
|
+
nextStepMap: nextStepsMapLegalCrossSells,
|
|
3044
|
+
}),
|
|
2976
3045
|
autoAndCarAccidentCrossSellQuestions(),
|
|
2977
3046
|
personalInjuryCrossSellQuestions(),
|
|
2978
3047
|
workersCompensationCrossSellQuestions(),
|
|
@@ -3456,17 +3525,44 @@ const TOLPFinalSubHeadlines = {
|
|
|
3456
3525
|
// 'Non-Workplace Discrimination': '',
|
|
3457
3526
|
};
|
|
3458
3527
|
|
|
3459
|
-
|
|
3460
3528
|
const nextStepsMapLegalLegacy = {
|
|
3461
|
-
|
|
3462
|
-
'
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3529
|
+
values: {
|
|
3530
|
+
'*': [
|
|
3531
|
+
'TOLPQuestions',
|
|
3532
|
+
'commentsWithBankruptcy',
|
|
3533
|
+
'legalCrossSells',
|
|
3534
|
+
'firstAndLast',
|
|
3535
|
+
'contactInfo',
|
|
3536
|
+
]
|
|
3537
|
+
}
|
|
3468
3538
|
};
|
|
3469
3539
|
|
|
3540
|
+
const nextStepsMapLegalCrossSells = {
|
|
3541
|
+
values: {
|
|
3542
|
+
'Legal_CrossSells': {
|
|
3543
|
+
'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
|
|
3544
|
+
'Personal Injury': ['personalInjuryCrossSellQuestions'],
|
|
3545
|
+
'Workers Compensation': ['workersCompensationCrossSellQuestions'],
|
|
3546
|
+
'DUI and DWI': ['duiAndDWICrossSellQuestions'],
|
|
3547
|
+
'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
|
|
3548
|
+
'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
|
|
3549
|
+
'Bankruptcy': ['bankruptcyCrossSellQuestions'],
|
|
3550
|
+
'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
|
|
3551
|
+
'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
|
|
3552
|
+
'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
|
|
3553
|
+
'Child Custody': ['childCustodyCrossSellQuestions'],
|
|
3554
|
+
},
|
|
3555
|
+
'*': ['firstAndLast', 'contactInfo'],
|
|
3556
|
+
},
|
|
3557
|
+
|
|
3558
|
+
// NOTE: this assumes a certain placement of the cross sell question
|
|
3559
|
+
// in the form flow.
|
|
3560
|
+
appendSteps: ['firstAndLast', 'contactInfo'],
|
|
3561
|
+
matchesAllowed: 1,
|
|
3562
|
+
};
|
|
3563
|
+
|
|
3564
|
+
const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
|
|
3565
|
+
|
|
3470
3566
|
const schema = [
|
|
3471
3567
|
defaultMetaPropsLegalLegacy(),
|
|
3472
3568
|
formAnchor(),
|
|
@@ -3476,6 +3572,7 @@ const schema = [
|
|
|
3476
3572
|
formId: 'generalLegal',
|
|
3477
3573
|
redirectMap: legalRedirectMap(),
|
|
3478
3574
|
valueOverrideMap: legalAllValueOverrideMap,
|
|
3575
|
+
crossSellOptionMap: legalCrossSellOptionMap
|
|
3479
3576
|
}),
|
|
3480
3577
|
children: [
|
|
3481
3578
|
headline({
|