From 1aed314ae31a638359a686ea16b25f313dbe7a75 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Tue, 3 Jun 2025 12:44:03 -0400 Subject: [PATCH] fix: registration Fix a couple typos in registration JS --- assets/js/register.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/assets/js/register.js b/assets/js/register.js index 8ab20cb..90240c2 100644 --- a/assets/js/register.js +++ b/assets/js/register.js @@ -1,8 +1,7 @@ // Get references to the form elements -const nameInput = document.getElementById("name"); -const emailInput = document.getElementById("emailAddress"); -const passwordInput = document.getElementById("password"); -const confirmPasswordInput = document.getElementById("confirmPassword"); +const nameInput = document.getElementById("registration_form_name"); +const emailInput = document.getElementById("registration_form_email"); +const passwordInput = document.getElementById("registration_form_plainPassword"); const csrfToken = document.getElementById("registration_form__token").value; // Add event listeners to the form @@ -18,25 +17,18 @@ function handleSubmit(event) { const name = nameInput.value; const email = emailInput.value; const password = passwordInput.value; - const confirmPassword = confirmPasswordInput.value; if (name === "" || email === "" || password === "") { alert("Please fill in all fields."); return; } - if (password !== confirmPassword) { - alert("Passwords do not match."); - return; - } - // Send data to server for processing const data = { "name": name, "email": email, - "password": password, "plainPassword": password, - "csrf_token": csrfToken + "_token": csrfToken }; fetch("/register", {