Feat: \n 1. Contact Us page form submission success page created. \n 2. Contact Us page styling and CAPTCHA text content. \n 3. Removal of ERP, Google CAPTCHA, and ALTCHA API code and left over comments in JavaScript, Python.
This commit is contained in:
@@ -4,6 +4,7 @@ import Events from "../lib/events.js";
|
||||
import LocalStorage from "../lib/local_storage.js";
|
||||
import API from "../api.js";
|
||||
import DOM from "../dom.js";
|
||||
import Utils from "../lib/utils.js";
|
||||
|
||||
import OverlayConfirm from "../components/common/temporary/overlay_confirm.js";
|
||||
import OverlayError from "../components/common/temporary/overlay_error.js";
|
||||
@@ -14,11 +15,10 @@ export default class BasePage {
|
||||
throw new Error("Router is required");
|
||||
}
|
||||
else {
|
||||
if (_verbose) { console.log("initialising with router: ", router); }
|
||||
Utils.consoleLogIfNotProductionEnvironment("initialising with router: ", router);
|
||||
}
|
||||
this.router = router;
|
||||
this.title = titlePageCurrent;
|
||||
// this.hash = hashPageCurrent;
|
||||
if (this.constructor === BasePage) {
|
||||
throw new Error("Cannot instantiate abstract class");
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export default class BasePage {
|
||||
}
|
||||
|
||||
logInitialisation() {
|
||||
if (_verbose) { console.log('Initializing ' + this.title + ' page'); }
|
||||
Utils.consoleLogIfNotProductionEnvironment('Initializing ' + this.title + ' page');
|
||||
}
|
||||
|
||||
hookupCommonElements() {
|
||||
@@ -58,7 +58,7 @@ export default class BasePage {
|
||||
|
||||
hookupLogos() {
|
||||
this.hookupEventHandler("click", "." + flagImageLogo + "," + "." + flagLogo, (event, element) => {
|
||||
if (_verbose) { console.log('clicking logo'); }
|
||||
Utils.consoleLogIfNotProductionEnvironment('clicking logo');
|
||||
this.router.navigateToHash(hashPageHome);
|
||||
});
|
||||
}
|
||||
@@ -81,15 +81,14 @@ export default class BasePage {
|
||||
Events.initialiseEventHandler('form.' + flagFilter + ' button.' + flagSave, flagInitialised, (button) => {
|
||||
button.addEventListener("click", (event) => {
|
||||
event.stopPropagation();
|
||||
if (_verbose) { console.log('saving page: ', this.title); }
|
||||
Utils.consoleLogIfNotProductionEnvironment('saving page: ', this.title);
|
||||
OverlayConfirm.show();
|
||||
});
|
||||
// button.classList.add(flagCollapsed);
|
||||
});
|
||||
}
|
||||
|
||||
leave() {
|
||||
if (_verbose) { console.log('Leaving ' + this.title + ' page'); }
|
||||
Utils.consoleLogIfNotProductionEnvironment('Leaving ' + this.title + ' page');
|
||||
if (this.constructor === BasePage) {
|
||||
throw new Error("Must implement leave() method.");
|
||||
}
|
||||
@@ -107,11 +106,11 @@ export default class BasePage {
|
||||
if (show) {
|
||||
buttonCancel.classList.remove(flagCollapsed);
|
||||
buttonSave.classList.remove(flagCollapsed);
|
||||
if (_verbose) { console.log('showing buttons'); }
|
||||
Utils.consoleLogIfNotProductionEnvironment('showing buttons');
|
||||
} else {
|
||||
buttonCancel.classList.add(flagCollapsed);
|
||||
buttonSave.classList.add(flagCollapsed);
|
||||
if (_verbose) { console.log('hiding buttons'); }
|
||||
Utils.consoleLogIfNotProductionEnvironment('hiding buttons');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,4 +119,5 @@ export default class BasePage {
|
||||
if (isDirty) document.querySelectorAll(idTableMain + ' tbody tr').remove();
|
||||
return isDirty;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user