forked from RiseUP/riseup-squad20
38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
// Cadastro
|
|
const registerForm = document.getElementById("registerForm");
|
|
if (registerForm) {
|
|
registerForm.addEventListener("submit", (e) => {
|
|
e.preventDefault();
|
|
const password = document.getElementById("password").value;
|
|
const confirmPassword = document.getElementById("confirmPassword").value;
|
|
|
|
if (password !== confirmPassword) {
|
|
alert("❌ As senhas não coincidem!");
|
|
return;
|
|
}
|
|
if (password.length < 6) {
|
|
alert("⚠️ A senha deve ter pelo menos 6 caracteres!");
|
|
return;
|
|
}
|
|
alert("✅ Simulação de cadastro realizada com sucesso!");
|
|
});
|
|
}
|
|
|
|
// Login
|
|
const loginForm = document.getElementById("loginForm");
|
|
if (loginForm) {
|
|
loginForm.addEventListener("submit", (e) => {
|
|
e.preventDefault();
|
|
alert("🔐 Simulação de Login realizada");
|
|
});
|
|
}
|
|
|
|
// Recuperar senha
|
|
const forgotForm = document.getElementById("forgotForm");
|
|
if (forgotForm) {
|
|
forgotForm.addEventListener("submit", (e) => {
|
|
e.preventDefault();
|
|
alert("📩 Link de recuperação enviado para seu e-mail!");
|
|
});
|
|
}
|