[pass-reset_script] Fix. Changed lines 2 & 3 to no-longer use a depreciated feature

This commit is contained in:
eoghan.conlon 2023-07-27 19:06:20 +01:00
parent 3042660079
commit 0c9ae88c31

View file

@ -1,6 +1,6 @@
const formEl = document.getElementById("reset"); const formEl = document.getElementById("reset");
formEl.addEventListener('submit', () => { formEl.addEventListener('submit', (listener) => {
event.preventDefault(); listener.preventDefault();
const formData = new FormData(formEl); const formData = new FormData(formEl);
if(formData.get("newPW") === formData.get("newPWConfirm")){ if(formData.get("newPW") === formData.get("newPWConfirm")){
formData.delete("newPWConfirm"); formData.delete("newPWConfirm");