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?',
|
|
@@ -705,20 +894,6 @@ const driversLicenseType = () => sbs2ItemRadio({
|
|
|
705
894
|
]
|
|
706
895
|
});
|
|
707
896
|
|
|
708
|
-
const email = (scope) => sbsText({
|
|
709
|
-
$formkit: 'email',
|
|
710
|
-
name: scope ? scope + ':' + 'Email' : 'Email',
|
|
711
|
-
label: 'Email Address:',
|
|
712
|
-
placeholder: 'email@domain.com',
|
|
713
|
-
autocomplete: 'email',
|
|
714
|
-
'data-tf-sensitive': 'false',
|
|
715
|
-
validation: 'required|email',
|
|
716
|
-
validationMessages: {
|
|
717
|
-
required: 'Email is required',
|
|
718
|
-
email: 'Invalid Email'
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
|
|
722
897
|
const employerType = () => sbsSelect({
|
|
723
898
|
label: 'The Employer Is a:',
|
|
724
899
|
name: 'Employer_Type',
|
|
@@ -751,17 +926,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
|
|
|
751
926
|
]
|
|
752
927
|
});
|
|
753
928
|
|
|
754
|
-
const firstName = (scope) => sbsText({
|
|
755
|
-
$formkit: 'text',
|
|
756
|
-
label: 'First Name:',
|
|
757
|
-
placeholder: 'First',
|
|
758
|
-
name: scope ? scope + ':' + 'First_Name' : 'First_Name',
|
|
759
|
-
autocomplete: "given-name",
|
|
760
|
-
validationMessages: {
|
|
761
|
-
required: 'First Name is required'
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
|
|
765
929
|
const haveAttorney = (scope) => sbsYesNoRadio({
|
|
766
930
|
name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
|
|
767
931
|
label: 'Already Working with An Attorney?'
|
|
@@ -845,17 +1009,6 @@ const incidentDate = (scope) => sbsDate({
|
|
|
845
1009
|
label: 'Date of Incident:',
|
|
846
1010
|
});
|
|
847
1011
|
|
|
848
|
-
const lastName = (scope) => sbsText({
|
|
849
|
-
$formkit: 'text',
|
|
850
|
-
label: 'Last Name:',
|
|
851
|
-
placeholder: 'Last',
|
|
852
|
-
name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
|
|
853
|
-
autocomplete: "family-name",
|
|
854
|
-
validationMessages: {
|
|
855
|
-
required: 'Last Name is required'
|
|
856
|
-
}
|
|
857
|
-
});
|
|
858
|
-
|
|
859
1012
|
const landlordTenantParty = () => sbsSelect({
|
|
860
1013
|
label: 'I am the:',
|
|
861
1014
|
name: 'Landlord_Tenant_Party',
|
|
@@ -897,69 +1050,7 @@ const legalCrossSells$1 = () => col2Checkbox({
|
|
|
897
1050
|
help: 'Just hit "Next" if none apply',
|
|
898
1051
|
helpClass: 't-text-center !t-text-sm',
|
|
899
1052
|
validation: null,
|
|
900
|
-
options:
|
|
901
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
|
|
902
|
-
then: {
|
|
903
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
904
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
905
|
-
'Workers Compensation': 'Workplace Injury',
|
|
906
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
907
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
908
|
-
'Child Custody': 'Need help with Child Custody',
|
|
909
|
-
},
|
|
910
|
-
else: {
|
|
911
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
|
|
912
|
-
then: {
|
|
913
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
914
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
915
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
916
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
917
|
-
'Child Custody': 'Need help with Child Custody',
|
|
918
|
-
// TODO add one more?
|
|
919
|
-
},
|
|
920
|
-
else: {
|
|
921
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
|
|
922
|
-
then: {
|
|
923
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
924
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
925
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
926
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
927
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
928
|
-
'Child Custody': 'Need help with Child Custody',
|
|
929
|
-
},
|
|
930
|
-
else: {
|
|
931
|
-
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"',
|
|
932
|
-
then: {
|
|
933
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
934
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
935
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
936
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
937
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
938
|
-
'Child Custody': 'Need help with Child Custody',
|
|
939
|
-
},
|
|
940
|
-
else: {
|
|
941
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
|
|
942
|
-
then: {
|
|
943
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
944
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
945
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
946
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
947
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
948
|
-
'Child Custody': 'Need help with Child Custody',
|
|
949
|
-
},
|
|
950
|
-
else: {
|
|
951
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
952
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
953
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
954
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
955
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
956
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
}
|
|
1053
|
+
options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
|
|
963
1054
|
});
|
|
964
1055
|
|
|
965
1056
|
const loanAmount = () => sbsSelect({
|
|
@@ -1056,24 +1147,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
|
|
|
1056
1147
|
label: 'Do you currently have any pending charges?'
|
|
1057
1148
|
});
|
|
1058
1149
|
|
|
1059
|
-
const phone = (scope) => sbsText({
|
|
1060
|
-
$formkit: 'tel',
|
|
1061
|
-
name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
|
|
1062
|
-
label: 'Phone Number:',
|
|
1063
|
-
placeholder: '###-###-####',
|
|
1064
|
-
maxlength: 12,
|
|
1065
|
-
help: '10-digit phone number, hyphens optional',
|
|
1066
|
-
autocomplete: 'tel-national',
|
|
1067
|
-
'data-tf-sensitive': 'false',
|
|
1068
|
-
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
1069
|
-
validationMessages: {
|
|
1070
|
-
required: 'Field is required',
|
|
1071
|
-
matches: 'Invalid Phone Format, use ###-###-####',
|
|
1072
|
-
valid_phone: 'Invalid Phone Number'
|
|
1073
|
-
},
|
|
1074
|
-
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
1075
|
-
});
|
|
1076
|
-
|
|
1077
1150
|
const primaryInjury = (scope) => sbs2ColRadio({
|
|
1078
1151
|
name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
|
|
1079
1152
|
label: 'Primary Injury:',
|
|
@@ -1340,21 +1413,6 @@ const wouldLikeLawyerTo = () => sbsRadio({
|
|
|
1340
1413
|
]
|
|
1341
1414
|
});
|
|
1342
1415
|
|
|
1343
|
-
const zipcode = (scope) => sbsText({
|
|
1344
|
-
label: 'Zip Code:',
|
|
1345
|
-
placeholder: '#####',
|
|
1346
|
-
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
1347
|
-
maxlength: 5,
|
|
1348
|
-
inputmode: "numeric",
|
|
1349
|
-
autocomplete: 'postal-code',
|
|
1350
|
-
validation: 'required|matches:/^[0-9]{5}$/',
|
|
1351
|
-
validationMessages: {
|
|
1352
|
-
required: 'Zip Code is required',
|
|
1353
|
-
matches: 'Invalid Zip Code'
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
1416
|
// ------ Question Groups
|
|
1359
1417
|
|
|
1360
1418
|
// NOTE: name must be unique within a form!
|
|
@@ -2199,13 +2257,20 @@ function crossSellQuestionsStepSubHeadline(updates) {
|
|
|
2199
2257
|
function commentsStepHeadline(updates) {
|
|
2200
2258
|
return {
|
|
2201
2259
|
$el: 'h3',
|
|
2202
|
-
children: updates.headline || 'Additional
|
|
2260
|
+
children: updates.headline || 'Additional Details',
|
|
2203
2261
|
attrs: {
|
|
2204
2262
|
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 || '')
|
|
2205
2263
|
}
|
|
2206
2264
|
}
|
|
2207
2265
|
}
|
|
2208
2266
|
|
|
2267
|
+
function commentsStepHeadlineLegal(updates) {
|
|
2268
|
+
return commentsStepHeadline({
|
|
2269
|
+
headline: updates.headline || 'Additional Case Details',
|
|
2270
|
+
headlineClass: updates.headlineClass
|
|
2271
|
+
})
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2209
2274
|
function firstAndLastStepHeadline(updates) {
|
|
2210
2275
|
return {
|
|
2211
2276
|
$el: 'h3',
|
|
@@ -2229,7 +2294,7 @@ function legalCrossSellsStepHeadline(updates) {
|
|
|
2229
2294
|
function contactStepHeadline(updates) {
|
|
2230
2295
|
return {
|
|
2231
2296
|
$el: 'h3',
|
|
2232
|
-
children: updates.headline ||
|
|
2297
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
|
|
2233
2298
|
attrs: {
|
|
2234
2299
|
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 || '')
|
|
2235
2300
|
}
|
|
@@ -2239,7 +2304,7 @@ function contactStepHeadline(updates) {
|
|
|
2239
2304
|
function contactStepSubHeadline(updates) {
|
|
2240
2305
|
return {
|
|
2241
2306
|
$el: 'h5',
|
|
2242
|
-
children: updates.subheadline ||
|
|
2307
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
|
|
2243
2308
|
attrs: {
|
|
2244
2309
|
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 || '')
|
|
2245
2310
|
}
|
|
@@ -2279,10 +2344,16 @@ const stepDefaults = (step, stepKey) => ({
|
|
|
2279
2344
|
}
|
|
2280
2345
|
});
|
|
2281
2346
|
|
|
2282
|
-
function step(name, inputs,
|
|
2283
|
-
|
|
2284
|
-
nextOnEnter = true
|
|
2285
|
-
|
|
2347
|
+
function step(name, inputs, updates = {}) {
|
|
2348
|
+
const {
|
|
2349
|
+
nextOnEnter = true,
|
|
2350
|
+
nextOnInput = false,
|
|
2351
|
+
stepKey = undefined,
|
|
2352
|
+
nextStepMap = undefined,
|
|
2353
|
+
triggerRedirectMap = undefined,
|
|
2354
|
+
autoFocus = undefined,
|
|
2355
|
+
} = updates;
|
|
2356
|
+
|
|
2286
2357
|
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
2287
2358
|
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
2288
2359
|
if (lastInput && nextOnEnter === true) {
|
|
@@ -2302,6 +2373,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
2302
2373
|
id: name,
|
|
2303
2374
|
name: name,
|
|
2304
2375
|
nextStepMap: nextStepMap,
|
|
2376
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
2305
2377
|
autoFocus: autoFocus,
|
|
2306
2378
|
children: inputs
|
|
2307
2379
|
}
|
|
@@ -2310,34 +2382,6 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
2310
2382
|
)
|
|
2311
2383
|
}
|
|
2312
2384
|
|
|
2313
|
-
function commentsWithBankruptcy(updates = {}) {
|
|
2314
|
-
return step(
|
|
2315
|
-
'commentsWithBankruptcy',
|
|
2316
|
-
[
|
|
2317
|
-
commentsStepHeadline(updates),
|
|
2318
|
-
comments({
|
|
2319
|
-
label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
|
|
2320
|
-
placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
|
|
2321
|
-
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
|
|
2322
|
-
}, updates.scope),
|
|
2323
|
-
// TODO: needs scope support
|
|
2324
|
-
bankruptcyCrossSell(),
|
|
2325
|
-
{
|
|
2326
|
-
$el: 'div',
|
|
2327
|
-
if: '$get(CrossSell_Bankruptcy).value == true',
|
|
2328
|
-
children: [
|
|
2329
|
-
comments({
|
|
2330
|
-
label: 'Bankruptcy or debt details:',
|
|
2331
|
-
placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
|
|
2332
|
-
inputClass: '!t-h-16'
|
|
2333
|
-
}, 'CrossSell:Bankruptcy')
|
|
2334
|
-
],
|
|
2335
|
-
}
|
|
2336
|
-
],
|
|
2337
|
-
false // nextOnEnter
|
|
2338
|
-
)
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
2385
|
function contactInfo(updates = {}) {
|
|
2342
2386
|
return step(
|
|
2343
2387
|
'contactInfo',
|
|
@@ -2350,7 +2394,7 @@ function contactInfo(updates = {}) {
|
|
|
2350
2394
|
TCPAConsent(updates.scope),
|
|
2351
2395
|
secureIcon()
|
|
2352
2396
|
],
|
|
2353
|
-
false
|
|
2397
|
+
{ nextOnEnter: false }
|
|
2354
2398
|
)
|
|
2355
2399
|
}
|
|
2356
2400
|
|
|
@@ -2362,10 +2406,37 @@ function firstAndLastV2(updates = {}) {
|
|
|
2362
2406
|
firstName(),
|
|
2363
2407
|
lastName()
|
|
2364
2408
|
],
|
|
2365
|
-
updates
|
|
2409
|
+
updates
|
|
2366
2410
|
)
|
|
2367
2411
|
}
|
|
2368
2412
|
|
|
2413
|
+
function commentsWithBankruptcy(updates = {}) {
|
|
2414
|
+
return step(
|
|
2415
|
+
'commentsWithBankruptcy',
|
|
2416
|
+
[
|
|
2417
|
+
commentsStepHeadlineLegal(updates),
|
|
2418
|
+
comments({
|
|
2419
|
+
label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
|
|
2420
|
+
placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
2421
|
+
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
|
|
2422
|
+
}, updates.scope),
|
|
2423
|
+
// TODO: needs scope support
|
|
2424
|
+
bankruptcyCrossSell(),
|
|
2425
|
+
{
|
|
2426
|
+
$el: 'div',
|
|
2427
|
+
if: '$get(CrossSell_Bankruptcy).value == true',
|
|
2428
|
+
children: [
|
|
2429
|
+
comments({
|
|
2430
|
+
label: 'Bankruptcy or debt details:',
|
|
2431
|
+
placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
|
|
2432
|
+
inputClass: '!t-h-16'
|
|
2433
|
+
}, 'CrossSell:Bankruptcy')
|
|
2434
|
+
],
|
|
2435
|
+
}
|
|
2436
|
+
],
|
|
2437
|
+
{ nextOnEnter: false }
|
|
2438
|
+
)
|
|
2439
|
+
}
|
|
2369
2440
|
|
|
2370
2441
|
const AllTOLPQuestions = () => {
|
|
2371
2442
|
return [
|
|
@@ -2437,11 +2508,10 @@ function generalLegalTOLPQuestions(updates = {}) {
|
|
|
2437
2508
|
return step(
|
|
2438
2509
|
'TOLPQuestions',
|
|
2439
2510
|
questions,
|
|
2440
|
-
updates
|
|
2511
|
+
updates
|
|
2441
2512
|
)
|
|
2442
2513
|
}
|
|
2443
2514
|
|
|
2444
|
-
|
|
2445
2515
|
function autoAndCarAccidentCrossSellQuestions(updates = {}) {
|
|
2446
2516
|
return step(
|
|
2447
2517
|
'autoAndCarAccidentCrossSellQuestions',
|
|
@@ -2458,7 +2528,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
|
|
|
2458
2528
|
'CrossSell:Auto_and_Car_Accidents'
|
|
2459
2529
|
)
|
|
2460
2530
|
],
|
|
2461
|
-
updates
|
|
2531
|
+
updates
|
|
2462
2532
|
)
|
|
2463
2533
|
}
|
|
2464
2534
|
|
|
@@ -2477,7 +2547,7 @@ function childCustodyCrossSellQuestions(updates = {}) {
|
|
|
2477
2547
|
'CrossSell:Child_Custody'
|
|
2478
2548
|
)
|
|
2479
2549
|
],
|
|
2480
|
-
updates
|
|
2550
|
+
updates
|
|
2481
2551
|
)
|
|
2482
2552
|
}
|
|
2483
2553
|
|
|
@@ -2496,7 +2566,7 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
|
|
|
2496
2566
|
'CrossSell:Divorce_and_Separation'
|
|
2497
2567
|
)
|
|
2498
2568
|
],
|
|
2499
|
-
updates
|
|
2569
|
+
updates
|
|
2500
2570
|
)
|
|
2501
2571
|
}
|
|
2502
2572
|
|
|
@@ -2515,7 +2585,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
|
|
|
2515
2585
|
'CrossSell:DUI_and_DWI'
|
|
2516
2586
|
)
|
|
2517
2587
|
],
|
|
2518
|
-
updates
|
|
2588
|
+
updates
|
|
2519
2589
|
)
|
|
2520
2590
|
}
|
|
2521
2591
|
|
|
@@ -2535,7 +2605,7 @@ function ssdiCrossSellQuestions(updates = {}) {
|
|
|
2535
2605
|
'CrossSell:Social_Security_Disability_and_Insurance'
|
|
2536
2606
|
)
|
|
2537
2607
|
],
|
|
2538
|
-
updates
|
|
2608
|
+
updates
|
|
2539
2609
|
)
|
|
2540
2610
|
}
|
|
2541
2611
|
|
|
@@ -2555,7 +2625,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
|
|
|
2555
2625
|
'CrossSell:Personal_Injury'
|
|
2556
2626
|
)
|
|
2557
2627
|
],
|
|
2558
|
-
updates
|
|
2628
|
+
updates
|
|
2559
2629
|
)
|
|
2560
2630
|
}
|
|
2561
2631
|
|
|
@@ -2574,7 +2644,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
|
|
|
2574
2644
|
'CrossSell:Power_of_Attorney'
|
|
2575
2645
|
)
|
|
2576
2646
|
],
|
|
2577
|
-
updates
|
|
2647
|
+
updates
|
|
2578
2648
|
)
|
|
2579
2649
|
}
|
|
2580
2650
|
|
|
@@ -2593,7 +2663,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
|
|
|
2593
2663
|
'CrossSell:Wills_and_Trusts'
|
|
2594
2664
|
)
|
|
2595
2665
|
],
|
|
2596
|
-
updates
|
|
2666
|
+
updates
|
|
2597
2667
|
)
|
|
2598
2668
|
}
|
|
2599
2669
|
|
|
@@ -2613,21 +2683,20 @@ function workersCompensationCrossSellQuestions(updates = {}) {
|
|
|
2613
2683
|
'CrossSell:Workers_Compensation'
|
|
2614
2684
|
)
|
|
2615
2685
|
],
|
|
2616
|
-
updates
|
|
2686
|
+
updates
|
|
2617
2687
|
)
|
|
2618
2688
|
}
|
|
2619
2689
|
|
|
2620
2690
|
function legalCrossSells(updates = {}) {
|
|
2691
|
+
updates.nextOnInput = false;
|
|
2692
|
+
updates.stepKey = '$get(Type_Of_Legal_Problem).value';
|
|
2621
2693
|
return step(
|
|
2622
2694
|
'legalCrossSells',
|
|
2623
2695
|
[
|
|
2624
2696
|
legalCrossSellsStepHeadline(updates),
|
|
2625
2697
|
legalCrossSells$1(),
|
|
2626
2698
|
],
|
|
2627
|
-
updates
|
|
2628
|
-
false,
|
|
2629
|
-
// Note: we should probably scope this stepKey to this step name
|
|
2630
|
-
'$get(Type_Of_Legal_Problem).value'
|
|
2699
|
+
updates
|
|
2631
2700
|
)
|
|
2632
2701
|
}
|
|
2633
2702
|
|
|
@@ -2646,10 +2715,7 @@ function realEstateTOLPAndZip(updates = {}) {
|
|
|
2646
2715
|
}),
|
|
2647
2716
|
zipcode()
|
|
2648
2717
|
],
|
|
2649
|
-
updates
|
|
2650
|
-
updates.nextOnInput,
|
|
2651
|
-
updates.stepKey,
|
|
2652
|
-
updates.nextStepMap
|
|
2718
|
+
updates
|
|
2653
2719
|
)
|
|
2654
2720
|
}
|
|
2655
2721
|
|
|
@@ -2792,9 +2858,7 @@ function formProps(updates) {
|
|
|
2792
2858
|
return props
|
|
2793
2859
|
}
|
|
2794
2860
|
|
|
2795
|
-
const metaDefaults = {
|
|
2796
|
-
tcpaLanguage: TCPA_LANGUAGE
|
|
2797
|
-
};
|
|
2861
|
+
const metaDefaults = {};
|
|
2798
2862
|
|
|
2799
2863
|
function metaProps(updates) {
|
|
2800
2864
|
const data = merge(
|
|
@@ -2807,7 +2871,7 @@ function metaProps(updates) {
|
|
|
2807
2871
|
}
|
|
2808
2872
|
}
|
|
2809
2873
|
|
|
2810
|
-
function
|
|
2874
|
+
function defaultMetaPropsLegal(tolps = null) {
|
|
2811
2875
|
let commentsPlaceholders = TOLPCommentsPlaceholders;
|
|
2812
2876
|
let finalHeadlines = TOLPFinalHeadlines;
|
|
2813
2877
|
let finalSubHeadlines = TOLPFinalSubHeadlines;
|
|
@@ -2817,23 +2881,27 @@ function defaultMetaProps(tolps = null) {
|
|
|
2817
2881
|
finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
|
|
2818
2882
|
}
|
|
2819
2883
|
return metaProps({
|
|
2820
|
-
|
|
2884
|
+
tcpaLanguage: TCPA_LANGUAGE_LEGAL,
|
|
2885
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
2821
2886
|
commentsPlaceholders: commentsPlaceholders,
|
|
2822
|
-
defaultFinalHeadline:
|
|
2887
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
|
|
2823
2888
|
finalHeadlines: finalHeadlines,
|
|
2824
|
-
defaultFinalSubHeadline:
|
|
2825
|
-
finalSubHeadlines: finalSubHeadlines
|
|
2889
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
|
|
2890
|
+
finalSubHeadlines: finalSubHeadlines
|
|
2826
2891
|
})
|
|
2827
2892
|
}
|
|
2828
2893
|
|
|
2829
2894
|
function defaultMetaPropsLegalLegacy() {
|
|
2830
|
-
const meta =
|
|
2895
|
+
const meta = defaultMetaPropsLegal();
|
|
2831
2896
|
meta.data.dynamicSchema = [
|
|
2832
2897
|
generalLegalTOLPQuestions(),
|
|
2833
2898
|
commentsWithBankruptcy({
|
|
2834
2899
|
inputClass: '!t-h-28',
|
|
2835
2900
|
}),
|
|
2836
|
-
legalCrossSells(
|
|
2901
|
+
legalCrossSells({
|
|
2902
|
+
headlineClass: '!t-text-dark',
|
|
2903
|
+
nextStepMap: nextStepsMapLegalCrossSells,
|
|
2904
|
+
}),
|
|
2837
2905
|
autoAndCarAccidentCrossSellQuestions(),
|
|
2838
2906
|
personalInjuryCrossSellQuestions(),
|
|
2839
2907
|
workersCompensationCrossSellQuestions(),
|
|
@@ -3324,17 +3392,44 @@ const TOLPFinalSubHeadlines = {
|
|
|
3324
3392
|
// 'Non-Workplace Discrimination': '',
|
|
3325
3393
|
};
|
|
3326
3394
|
|
|
3327
|
-
|
|
3328
3395
|
const nextStepsMapLegalLegacy = {
|
|
3329
|
-
|
|
3330
|
-
'
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3396
|
+
values: {
|
|
3397
|
+
'*': [
|
|
3398
|
+
'TOLPQuestions',
|
|
3399
|
+
'commentsWithBankruptcy',
|
|
3400
|
+
'legalCrossSells',
|
|
3401
|
+
'firstAndLast',
|
|
3402
|
+
'contactInfo',
|
|
3403
|
+
]
|
|
3404
|
+
}
|
|
3336
3405
|
};
|
|
3337
3406
|
|
|
3407
|
+
const nextStepsMapLegalCrossSells = {
|
|
3408
|
+
values: {
|
|
3409
|
+
'Legal_CrossSells': {
|
|
3410
|
+
'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
|
|
3411
|
+
'Personal Injury': ['personalInjuryCrossSellQuestions'],
|
|
3412
|
+
'Workers Compensation': ['workersCompensationCrossSellQuestions'],
|
|
3413
|
+
'DUI and DWI': ['duiAndDWICrossSellQuestions'],
|
|
3414
|
+
'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
|
|
3415
|
+
'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
|
|
3416
|
+
'Bankruptcy': ['bankruptcyCrossSellQuestions'],
|
|
3417
|
+
'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
|
|
3418
|
+
'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
|
|
3419
|
+
'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
|
|
3420
|
+
'Child Custody': ['childCustodyCrossSellQuestions'],
|
|
3421
|
+
},
|
|
3422
|
+
'*': ['firstAndLast', 'contactInfo'],
|
|
3423
|
+
},
|
|
3424
|
+
|
|
3425
|
+
// NOTE: this assumes a certain placement of the cross sell question
|
|
3426
|
+
// in the form flow.
|
|
3427
|
+
appendSteps: ['firstAndLast', 'contactInfo'],
|
|
3428
|
+
matchesAllowed: 1,
|
|
3429
|
+
};
|
|
3430
|
+
|
|
3431
|
+
const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
|
|
3432
|
+
|
|
3338
3433
|
const schema = [
|
|
3339
3434
|
defaultMetaPropsLegalLegacy(),
|
|
3340
3435
|
formAnchor(),
|
|
@@ -3343,7 +3438,8 @@ const schema = [
|
|
|
3343
3438
|
props: formProps({
|
|
3344
3439
|
formId: 'realEstate',
|
|
3345
3440
|
redirectMap: legalRedirectMap(),
|
|
3346
|
-
valueOverrideMap: legalAllValueOverrideMap
|
|
3441
|
+
valueOverrideMap: legalAllValueOverrideMap,
|
|
3442
|
+
crossSellOptionMap: legalCrossSellOptionMap
|
|
3347
3443
|
}),
|
|
3348
3444
|
children: [
|
|
3349
3445
|
defaultHeadline(),
|