loads of tweaks for adding may newsletter and misson trip reports

This includes server pieces that are not live just yet
This commit is contained in:
Chris Cochrun 2023-06-09 07:14:42 -05:00
parent a0f462eae0
commit 341c3cbcd3
37 changed files with 62 additions and 23 deletions

View file

@ -66,34 +66,31 @@
let obj = {};
data.forEach((value, key) => obj[key] = value);
/* console.log(JSON.stringify(data)); */
fetch("http://localhost:4242/health-form", {
method: "POST",
/* headers: {
* "Content-Type": "application/json",
* }, */
body: data
}).then((res) => {
console.log(res);
if (res.ok) {
if (mtRegistration === 'now')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3';
else if (registration === 'now')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ';
else if (registration === 'full')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE';
else
window.location.href = '/thankyou/';
}
});
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
/* if (mtRegistration === 'now')
* window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3';
* else if (registration === 'now')
* window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ';
* else if (registration === 'full')
* window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE';
* else
* window.location.href = '/thankyou/'; */
}
};
/* xhr.open("POST", "http://localhost:4242/health-form"); */
/* xhr.send(data); */
/* var xhr = new XMLHttpRequest();
* xhr.onreadystatechange = function() {
* if (this.readyState == 4 && this.status == 200) {
* }
* };
* xhr.open("POST", "https://n8n.tfcconnection.org/webhook/health-form");
* xhr.send(data); */
console.log(data);
console.log("Hallo!");
/* window.location.replace("https://tfcconnection.org/thankyou/"); */
}