Added terms and conditions logic
This commit is contained in:
parent
1c29421f73
commit
795e3b12ce
4 changed files with 92 additions and 12 deletions
14
static/js/check.js
Normal file
14
static/js/check.js
Normal 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");
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue