You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/scripts/dist/optin-ladder.js
+43-20Lines changed: 43 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,11 @@
1
-
// This component is responsible for showing a ladder of checkboxes, one at a time, to the user.
2
-
// If the page is not embedded in an iframe, and there are EN's Opt-In fields on the page, we will store the values to sessionStorage upon Form Submit.
3
-
// If the page is embedded in an iframe and on a Thank You Page, we will look for .optin-ladder elements, compare the values to sessionStorage, and show the next checkbox in the ladder, removing all but the first match.
4
-
// If the page is embedded in an iframe and on a Thank You Page, and the child iFrame is also a Thank You Page, we will look for a sessionStorage that has the current ladder step and the total number of steps.
5
-
// If the current step is less than the total number of steps, we will redirect to the first page. If the current step is equal to the total number of steps, we will show the Thank You Page.
* This component is responsible for showing a ladder of checkboxes, one at a time, to the user.
4
+
* If the page is not embedded in an iframe, and there are EN's Opt-In fields on the page, we will store the values to sessionStorage upon Form Submit.
5
+
* If the page is embedded in an iframe and on a Thank You Page, we will look for .optin-ladder elements, compare the values to sessionStorage, and show the next checkbox in the ladder, removing all but the first match.
6
+
* If the page is embedded in an iframe and on a Thank You Page, and the child iFrame is also a Thank You Page, we will look for a sessionStorage that has the current ladder step and the total number of steps.
7
+
* If the current step is less than the total number of steps, we will redirect to the first page. If the current step is equal to the total number of steps, we will show the Thank You Page.
8
+
*/
6
9
import{EngridLogger,ENGrid,EnForm}from".";
7
10
exportclassOptInLadder{
8
11
constructor(){
@@ -95,7 +98,7 @@ export class OptInLadder {
95
98
if(!emailField||!emailField.value){
96
99
this.logger.log("Email field is empty");
97
100
// Since this is a OptInLadder page with no e-mail address, hide the page
Copy file name to clipboardExpand all lines: packages/scripts/src/optin-ladder.ts
+49-21Lines changed: 49 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,11 @@
1
-
// This component is responsible for showing a ladder of checkboxes, one at a time, to the user.
2
-
// If the page is not embedded in an iframe, and there are EN's Opt-In fields on the page, we will store the values to sessionStorage upon Form Submit.
3
-
// If the page is embedded in an iframe and on a Thank You Page, we will look for .optin-ladder elements, compare the values to sessionStorage, and show the next checkbox in the ladder, removing all but the first match.
4
-
// If the page is embedded in an iframe and on a Thank You Page, and the child iFrame is also a Thank You Page, we will look for a sessionStorage that has the current ladder step and the total number of steps.
5
-
// If the current step is less than the total number of steps, we will redirect to the first page. If the current step is equal to the total number of steps, we will show the Thank You Page.
* This component is responsible for showing a ladder of checkboxes, one at a time, to the user.
4
+
* If the page is not embedded in an iframe, and there are EN's Opt-In fields on the page, we will store the values to sessionStorage upon Form Submit.
5
+
* If the page is embedded in an iframe and on a Thank You Page, we will look for .optin-ladder elements, compare the values to sessionStorage, and show the next checkbox in the ladder, removing all but the first match.
6
+
* If the page is embedded in an iframe and on a Thank You Page, and the child iFrame is also a Thank You Page, we will look for a sessionStorage that has the current ladder step and the total number of steps.
7
+
* If the current step is less than the total number of steps, we will redirect to the first page. If the current step is equal to the total number of steps, we will show the Thank You Page.
8
+
*/
6
9
import{EngridLogger,ENGrid,EnForm}from".";
7
10
8
11
exportclassOptInLadder{
@@ -114,7 +117,7 @@ export class OptInLadder {
114
117
if(!emailField||!emailField.value){
115
118
this.logger.log("Email field is empty");
116
119
// Since this is a OptInLadder page with no e-mail address, hide the page
0 commit comments