Skip to content

Commit

Permalink
voltei o botão de addclube
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlosesposito22 committed Nov 10, 2024
1 parent 1f3bfea commit 4da6127
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions site_cc/templates/addClube.html
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ <h1 class="text-start">Create your new <p class="h1 fw-bold reading-club">readin

<input type="hidden" id="moderador" name="moderador">

<button class="create-btn" id="create-btn">Create Club</button>
<button class="create-btn" id="create-btn" disabled>Create Club</button>
</form>
</div>
</div>
Expand Down Expand Up @@ -464,21 +464,21 @@ <h1 class="text-start">Create your new <p class="h1 fw-bold reading-club">readin
return allValid;
}

// function toggleSubmitButton() {
// const button = document.getElementById("create-btn");
// if (validateForm()) {
// button.removeAttribute("disabled");
// } else {
// button.setAttribute("disabled", "true");
// }
// }

// document.querySelectorAll("input, textarea, select").forEach(input => {
// input.addEventListener("input", toggleSubmitButton);
// if (input.type === "checkbox") {
// input.addEventListener("change", toggleSubmitButton);
// }
// });
function toggleSubmitButton() {
const button = document.getElementById("create-btn");
if (validateForm()) {
button.removeAttribute("disabled");
} else {
button.setAttribute("disabled", "true");
}
}

document.querySelectorAll("input, textarea, select").forEach(input => {
input.addEventListener("input", toggleSubmitButton);
if (input.type === "checkbox") {
input.addEventListener("change", toggleSubmitButton);
}
});

var name = "{{ user.id }}";
document.getElementById("moderador").value = name;
Expand Down

0 comments on commit 4da6127

Please sign in to comment.