trying to switch to using lisp but need to build it first

This commit is contained in:
Chris Cochrun 2024-03-26 14:30:37 -05:00
parent 09b9e8fb5b
commit ae37869c9f
8 changed files with 248 additions and 102 deletions

View file

@ -22,9 +22,59 @@
document.getElementById('warning-email').style.height = '0';
document.getElementById('warning-email').style.margin = '0';
}
if (data.get("firstname") == "") {
document.getElementById('warning-name').style.visibility = 'visible';
document.getElementById('warning-name').style.height = '';
document.getElementById('warning-name').style.margin = '';
return false;
} else {
document.getElementById('warning-name').style.visibility = 'hidden';
document.getElementById('warning-name').style.height = '0';
document.getElementById('warning-name').style.margin = '0';
}
if (data.get("lastname") == "") {
document.getElementById('warning-name').style.visibility = 'visible';
document.getElementById('warning-name').style.height = '';
document.getElementById('warning-name').style.margin = '';
return false;
} else {
document.getElementById('warning-name').style.visibility = 'hidden';
document.getElementById('warning-name').style.height = '0';
document.getElementById('warning-name').style.margin = '0';
}
if (data.get("parentfirstname") == "") {
document.getElementById('warning-name').style.visibility = 'visible';
document.getElementById('warning-name').style.height = '';
document.getElementById('warning-name').style.margin = '';
return false;
} else {
document.getElementById('warning-name').style.visibility = 'hidden';
document.getElementById('warning-name').style.height = '0';
document.getElementById('warning-name').style.margin = '0';
}
if (data.get("parentlastname") == "") {
document.getElementById('warning-name').style.visibility = 'visible';
document.getElementById('warning-name').style.height = '';
document.getElementById('warning-name').style.margin = '';
return false;
} else {
document.getElementById('warning-name').style.visibility = 'hidden';
document.getElementById('warning-name').style.height = '0';
document.getElementById('warning-name').style.margin = '0';
}
if (data.get("final-agreement") == "") {
document.getElementById('warning-agreement').style.visibility = 'visible';
document.getElementById('warning-agreement').style.height = '';
document.getElementById('warning-agreement').style.margin = '';
return false;
} else {
document.getElementById('warning-agreement').style.visibility = 'hidden';
document.getElementById('warning-agreement').style.height = '0';
document.getElementById('warning-agreement').style.margin = '0';
}
/* let base = "http://localhost:4242/camp-form"; */
let base = "https://api.tfcconnection.org/camp-form";
let base = "http://localhost:4242/camp-form";
/* let base = "https://api.tfcconnection.org/camp-form"; */
fetch(base, {
method: "POST",
@ -61,6 +111,15 @@
document.getElementById('warning-email').style.visibility = 'hidden';
document.getElementById('warning-email').style.height = '0';
document.getElementById('warning-email').style.margin = '0';
document.getElementById('warning-name').style.visibility = 'hidden';
document.getElementById('warning-name').style.height = '0';
document.getElementById('warning-name').style.margin = '0';
document.getElementById('warning-agreement').style.visibility = 'hidden';
document.getElementById('warning-agreement').style.height = '0';
document.getElementById('warning-agreement').style.margin = '0';
document.getElementById('warning-other').style.visibility = 'hidden';
document.getElementById('warning-other').style.height = '0';
document.getElementById('warning-other').style.margin = '0';
}
document.addEventListener('DOMContentLoaded', process);
</script>
@ -243,5 +302,26 @@
</span>
</div>
<div id="warning-name" class="basis-full mt-10 flex px-4 py-3 rounded-lg bg-[#ef4444] dark:bg-[#ef4444]">
<span class="text-[#fca5a5] ltr:pr-3 rtl:pl-3 content-right float-right">
{{ partial "icon.html" (.Get 0 | default "triangle-exclamation") }}
Make sure that all names are filled out
</span>
</div>
<div id="warning-agreement" class="basis-full mt-10 flex px-4 py-3 rounded-lg bg-[#ef4444] dark:bg-[#ef4444]">
<span class="text-[#fca5a5] ltr:pr-3 rtl:pl-3 content-right float-right">
{{ partial "icon.html" (.Get 0 | default "triangle-exclamation") }}
You have to agree to the registration information.
</span>
</div>
<div id="warning-other" class="basis-full mt-10 flex px-4 py-3 rounded-lg bg-[#ef4444] dark:bg-[#ef4444]">
<span class="text-[#fca5a5] ltr:pr-3 rtl:pl-3 content-right float-right">
{{ partial "icon.html" (.Get 0 | default "triangle-exclamation") }}
Have you checked to make sure all required fields are filled out?
</span>
</div>
</form>
</div>