Added terms and conditions logic

This commit is contained in:
ericb 2024-12-04 13:45:28 +01:00
parent 1c29421f73
commit 795e3b12ce
4 changed files with 92 additions and 12 deletions

14
static/js/check.js Normal file
View file

@ -0,0 +1,14 @@
document.addEventListener("DOMContentLoaded", function() {
const checkTerms = document.querySelector('#cgv-check');
const createAccountButton = document.querySelector('#btnCreateAccount');
const readTerms = document.querySelector('#readTerms');
console.log(checkTerms, createAccountButton);
checkTerms.addEventListener("change", function() {
createAccountButton.disabled = !checkTerms.checked;
if (checkTerms.checked) {
readTerms.classList.add("validated");
} else {
readTerms.classList.remove("validated");
}
});
});