mod-build 3.6.52-beta.2 → 3.6.52-beta.3
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/CHANGELOG.md +0 -4
- package/gulp-tasks/grab-cdn.js +13 -10
- package/package.json +1 -1
- package/src/scripts/mod-form-contractor.js +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 3.6.53
|
|
4
|
-
|
|
5
|
-
- Since we moved our footer modal templates to live in /quote/resources/shared-resources/, we needed to update `grab-cdn` gulp task to copy them from the updated path
|
|
6
|
-
|
|
7
3
|
## 3.6.52
|
|
8
4
|
|
|
9
5
|
- Added `templatesData.primary_trade` conditional to the `fetchTcpaFromSitegenie()` function so it won't try to run on quote/home-remodel
|
package/gulp-tasks/grab-cdn.js
CHANGED
|
@@ -3,7 +3,7 @@ var source = require('vinyl-source-stream');
|
|
|
3
3
|
|
|
4
4
|
// helper to allow us to define an "end" event to multiple streams
|
|
5
5
|
function streamToDestination(gulp, siteSettings, inputPath, destPath, fileName) {
|
|
6
|
-
var url = `https://${siteSettings.nodeEnv}${inputPath}`;
|
|
6
|
+
var url = `https://${siteSettings.nodeEnv}/quote/resources/mod-site${inputPath}`;
|
|
7
7
|
|
|
8
8
|
return new Promise(resolve => { // eslint-disable-line no-undef
|
|
9
9
|
request(url)
|
|
@@ -30,27 +30,30 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
30
30
|
// key: inputPath, value: destPath
|
|
31
31
|
|
|
32
32
|
externalResources = {
|
|
33
|
-
'/
|
|
33
|
+
'/templates/scripts/trusted-form.html': ['/templates/scripts/', 'trusted-form.html']
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
// grab footer modals and place under the resources
|
|
37
37
|
Object.assign(externalResources, {
|
|
38
|
-
'/
|
|
39
|
-
'/
|
|
40
|
-
'/
|
|
41
|
-
'/
|
|
42
|
-
'/
|
|
38
|
+
'/templates/modals/about/': ['/resources/templates/modals/about/', 'index.html'],
|
|
39
|
+
'/templates/modals/privacy/': ['/resources/templates/modals/privacy/', 'index.html'],
|
|
40
|
+
'/templates/modals/terms/': ['/resources/templates/modals/terms/', 'index.html'],
|
|
41
|
+
'/templates/modals/contact-us/': ['/resources/templates/modals/contact-us/', 'index.html'],
|
|
42
|
+
'/templates/modals/faq/': ['/resources/templates/modals/faq/', 'index.html']
|
|
43
43
|
})
|
|
44
44
|
|
|
45
|
-
Object.assign(externalResources, {'/
|
|
45
|
+
Object.assign(externalResources, {'/templates/scripts/jornaya.html': ['/templates/scripts/', 'jornaya.html']});
|
|
46
46
|
|
|
47
47
|
if (isModWhiteLabel || domainHasModernize) {
|
|
48
|
-
Object.assign(externalResources, {'/
|
|
48
|
+
Object.assign(externalResources, {'/templates/scripts/recaptcha.html': ['/templates/scripts/', 'recaptcha.html']});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// local dev files
|
|
52
52
|
const remoteFilesForLocalDev = {
|
|
53
|
-
'/
|
|
53
|
+
'/scripts/mod-form.js': ['/temp/scripts/', 'mod-form.js'],
|
|
54
|
+
'/scripts/mod-utils.js': ['/temp/scripts/', 'mod-utils.js'],
|
|
55
|
+
'/scripts/qs-form.js': ['/temp/scripts/', 'qs-form.js'],
|
|
56
|
+
'/scripts/vendor/maxmind-geoip2.js': ['/temp/scripts/', 'maxmind-geoip2.js']
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
if (!nodeEnv) {
|
package/package.json
CHANGED
|
@@ -137,17 +137,21 @@ modForm.mapProjectValue = function(trade) {
|
|
|
137
137
|
*/
|
|
138
138
|
modForm.preprocessContractorFormData = function(formData, currentStep) {
|
|
139
139
|
if (currentStep === 0) {
|
|
140
|
-
var
|
|
140
|
+
var heapCookie = window.heap && window.heap.appid ? window.modUtils.getCookie('_hp2_id.' + window.heap.appid) : null,
|
|
141
141
|
attributionKeys = modUtils.getSupportedTrackingParams();
|
|
142
142
|
|
|
143
143
|
formData.primaryProjectClass = this.mapProjectValue(formData.primaryProjectClass);
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
if (heapCookie) {
|
|
146
|
+
var heapCookieData = JSON.parse(decodeURIComponent(heapCookie));
|
|
147
|
+
|
|
148
|
+
// Check heap cookie for tracking params and append to form
|
|
149
|
+
$.each(heapCookieData, function(name, value) {
|
|
150
|
+
if (attributionKeys.indexOf(name) > -1) {
|
|
151
|
+
formData[name] = value;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
151
155
|
|
|
152
156
|
// Check Eloqua GUID cookie value and add it to formData
|
|
153
157
|
var elqGUID = this.elqGetGuidCookieValue();
|