Skip to content

Commit

Permalink
disable xverify on specific page
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelT372 committed Jul 31, 2024
1 parent 7e3ef56 commit fa92b2a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dist/engrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* ENGRID PAGE TEMPLATE ASSETS
*
* Date: Wednesday, July 31, 2024 @ 11:47:37 ET
* Date: Wednesday, July 31, 2024 @ 13:07:52 ET
* By: michael
* ENGrid styles: v0.18.18
* ENGrid scripts: v0.18.18
Expand Down
22 changes: 7 additions & 15 deletions dist/engrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* ENGRID PAGE TEMPLATE ASSETS
*
* Date: Wednesday, July 31, 2024 @ 11:47:37 ET
* Date: Wednesday, July 31, 2024 @ 13:07:52 ET
* By: michael
* ENGrid styles: v0.18.18
* ENGrid scripts: v0.18.18
Expand Down Expand Up @@ -21524,6 +21524,11 @@ class XVerify {
}

init() {
if ([64320].includes(engrid_ENGrid.getPageID())) {
this.logger.log(`XVerify is Disabled for Page ID: ${engrid_ENGrid.getPageID()}`);
return;
}

if (!this.emailField) {
this.logger.log("E-mail Field Not Found", this.emailField);
return;
Expand Down Expand Up @@ -21772,20 +21777,7 @@ const options = {
}

return true;
} // onError: () => {
// console.log('validation error');
// // Optional email field on specific pages
// if ([64320].includes(App.getPageID())) {
// console.log('validation error');
//
// if (App.getFieldValue('supporter.emailAddress') === '') {
// console.log('validation error');
//
// App.setFieldValue('supporter.emailAddress', '[email protected]');
// }
// }
// }

}
};

if (document.body.dataset.engridTheme === "nwf2") {
Expand Down
2 changes: 1 addition & 1 deletion dist/engrid.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/engrid.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/scripts/xverify/xverify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export class XVerify {
return XVerify.instance;
}
private init() {
if ([64320].includes(ENGrid.getPageID())) {
this.logger.log(`XVerify is Disabled for Page ID: ${ENGrid.getPageID()}`);
return;
}
if (!this.emailField) {
this.logger.log("E-mail Field Not Found", this.emailField);
return;
Expand Down

0 comments on commit fa92b2a

Please sign in to comment.