From f3d51c205d5a052678c6fbfa97db62007b2e78ed Mon Sep 17 00:00:00 2001 From: "eoghan.conlon" Date: Sat, 29 Jul 2023 22:37:20 +0100 Subject: [PATCH] [Email Change] Refactoring script and html form for email rather than password #1 --- src/PassReset/formHandler.js | 6 +++--- src/PassReset/index.html | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/PassReset/formHandler.js b/src/PassReset/formHandler.js index 9ac1bba..0699f87 100644 --- a/src/PassReset/formHandler.js +++ b/src/PassReset/formHandler.js @@ -6,9 +6,9 @@ function formHandler(listener){ const formData = new FormData(formEl); const user = formData.get("user"); const pass = formData.get("pass"); - const newPW = formData.get("newPW"); - if(newPW === formData.get("newPWConfirm")){ - const object = {user: user, pass: pass, field: "userPassword", value: newPW} + const newEmail = formData.get("newEmail"); + if(newEmail === formData.get("newEmail2")){ + const object = {user: user, pass: pass, field: "mail", value: newEmail} fetch('https://api.sso.skynet.ie/ldap/update', { method: 'POST', body: JSON.stringify(object) diff --git a/src/PassReset/index.html b/src/PassReset/index.html index 9e88441..0fb348d 100644 --- a/src/PassReset/index.html +++ b/src/PassReset/index.html @@ -9,12 +9,12 @@

- +
- -
- -
+ +
+ +