making the mt-form have some agreement before the form appears

This commit is contained in:
Chris Cochrun 2022-11-05 14:55:03 -05:00
parent 5d2fa30ff4
commit aabf84a80c
2 changed files with 54 additions and 4 deletions

View file

@ -1441,6 +1441,10 @@ select {
order: -9999; order: -9999;
} }
.m-2 {
margin: 0.5rem;
}
.m-auto { .m-auto {
margin: auto; margin: auto;
} }
@ -1453,6 +1457,14 @@ select {
margin: 0.25rem; margin: 0.25rem;
} }
.m-4 {
margin: 1rem;
}
.m-6 {
margin: 1.5rem;
}
.my-0 { .my-0 {
margin-top: 0px; margin-top: 0px;
margin-bottom: 0px; margin-bottom: 0px;
@ -1635,14 +1647,14 @@ select {
height: 100vh; height: 100vh;
} }
.h-24 {
height: 6rem;
}
.h-12 { .h-12 {
height: 3rem; height: 3rem;
} }
.h-24 {
height: 6rem;
}
.h-1\/2 { .h-1\/2 {
height: 50%; height: 50%;
} }
@ -2011,6 +2023,11 @@ select {
--tw-gradient-to: rgba(var(--color-secondary-700), 1); --tw-gradient-to: rgba(var(--color-secondary-700), 1);
} }
.box-decoration-slice {
-webkit-box-decoration-break: slice;
box-decoration-break: slice;
}
.object-cover { .object-cover {
-o-object-fit: cover; -o-object-fit: cover;
object-fit: cover; object-fit: cover;

View file

@ -1,4 +1,37 @@
<script>
function process() {
var studentAgree = document.getElementById("student-agree").checked;
console.log(studentAgree);
var parentAgree = document.getElementById("adult-agree").checked;
console.log(parentAgree);
if (studentAgree && parentAgree) {
document.getElementById('form').hidden = false
console.log("WOOHOO");
}
else {
document.getElementById('form').hidden = true
console.log("NEGATORY");
}
}
document.addEventListener('DOMContentLoaded', process);
</script>
<div class="m-4">
<div class="p-2">
<input type="checkbox" name="student-agree" id="student-agree" onclick="process()" />
<label for="student-agree">I agree to the above</label>
</div>
<div class="p-2">
<input type="checkbox" name="adult-agree" id="adult-agree" onclick="process()" />
<label for="adult-agree">Parent agrees to the above</label>
</div>
</div>
<div class="h-12" style="display: flex;"></div>
<iframe <iframe
id="form"
class="mt-form w-full h-screen" class="mt-form w-full h-screen"
src="https://tbl.tfcconnection.org/dashboard/#/nc/form/771dc7dc-9a82-49e4-abfe-0fd7b72281f2?embed" src="https://tbl.tfcconnection.org/dashboard/#/nc/form/771dc7dc-9a82-49e4-abfe-0fd7b72281f2?embed"
frameborder="0" frameborder="0"