mod-build 3.6.53 → 3.6.55
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.55
|
|
4
|
+
- Added conditional to check if `siteData` is empty — so our `fetchTcpaFromSitegenie()` and `getDefaultFormFieldConfig()` functions won't try to run on modify.modernize.com
|
|
5
|
+
|
|
6
|
+
## 3.6.54
|
|
7
|
+
|
|
8
|
+
- swapping out `modUtils.getHeapCookieData()` in the old (but still used) mod-form-contractor.js
|
|
9
|
+
|
|
3
10
|
## 3.6.53
|
|
4
11
|
|
|
5
12
|
- 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
|
|
@@ -8,7 +15,6 @@
|
|
|
8
15
|
|
|
9
16
|
- Added `templatesData.primary_trade` conditional to the `fetchTcpaFromSitegenie()` function so it won't try to run on quote/home-remodel
|
|
10
17
|
|
|
11
|
-
|
|
12
18
|
## 3.6.50
|
|
13
19
|
|
|
14
20
|
- Added functionality in `templates.js` to grab the tcpa from sitegenie at build time
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -242,12 +242,14 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
242
242
|
};
|
|
243
243
|
|
|
244
244
|
return async function() {
|
|
245
|
-
if (
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
if (Object.keys(siteData).length > 0) {
|
|
246
|
+
if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
|
|
247
|
+
await getDefaultFormFieldConfig();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (!templatesData.tcpaText && templatesData.primary_trade) {
|
|
251
|
+
await fetchTcpaFromSitegenie();
|
|
252
|
+
}
|
|
251
253
|
}
|
|
252
254
|
|
|
253
255
|
return gulp.src([
|
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();
|