From de6f884812c4a7d14544b104d43abfc2d6a7dcfb Mon Sep 17 00:00:00 2001 From: "eoghan.conlon" Date: Thu, 27 Jul 2023 00:36:36 +0100 Subject: [PATCH] [Pass-reset] Crude form parser now reads the entire form --- src/PassReset/index.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/PassReset/index.html b/src/PassReset/index.html index ba4b512..a6b55d3 100644 --- a/src/PassReset/index.html +++ b/src/PassReset/index.html @@ -27,8 +27,18 @@ document.getElementById('year').textContent = new Date().getFullYear().toString(); function handleSubmit(form) { - let uid = form.uid.value; - console.log(uid); + const field = "password" + const user = form.uid.value; + const pass = form.oldPW.value; + const newPW = form.newPW.value; + const newPWConfirm = form.newPWConfirm.value; + if (newPW === newPWConfirm){ + const value = newPW; + console.log("new passwords match") + } else { + console.log("New password confirmation doesn't match"); + } + console.log(user); } \ No newline at end of file