parent
f3d51c205d
commit
0f557ab420
4 changed files with 16 additions and 16 deletions
|
@ -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)
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
<form id="reset">
|
||||
<label for="user">Username</label>
|
||||
<input type="text" id="user" name="user" /> <br />
|
||||
<label for="pass">Old Password</label>
|
||||
<label for="pass">Password</label>
|
||||
<input type="password" id="pass" name="pass" /> <br />
|
||||
<label for="newPW1">New Password</label>
|
||||
<input type="password" id="newPW1" name="newPW" /> <br />
|
||||
<label for="newPW2">Confirm</label>
|
||||
<input type="password" id="newPW2" name="newPWConfirm" /> <br />
|
||||
<label for="newEmail">New email</label>
|
||||
<input type="email" id="newEmail" name="newPW" /> <br />
|
||||
<label for="newEmail2">Confirm</label>
|
||||
<input type="email" id="newEmail2" name="newPWConfirm" /> <br />
|
||||
<input type="Submit" value="Submit" />
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
|
|
|
@ -6,9 +6,9 @@ function formHandler(listener){
|
|||
const formData = new FormData(formEl);
|
||||
const user = formData.get("user");
|
||||
const pass = formData.get("pass");
|
||||
const newEmail = formData.get("newEmail");
|
||||
if(newEmail === formData.get("newEmail2")){
|
||||
const object = {user: user, pass: pass, field: "mail", value: newEmail}
|
||||
const newPW = formData.get("newPW");
|
||||
if(newPW === formData.get("newPWConfirm")){
|
||||
const object = {user: user, pass: pass, field: "userPassword", value: newPW}
|
||||
fetch('https://api.sso.skynet.ie/ldap/update', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(object)
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
<form id="reset">
|
||||
<label for="user">Username</label>
|
||||
<input type="text" id="user" name="user" /> <br />
|
||||
<label for="pass">Password</label>
|
||||
<label for="pass">Old Password</label>
|
||||
<input type="password" id="pass" name="pass" /> <br />
|
||||
<label for="newEmail">New email</label>
|
||||
<input type="email" id="newEmail" name="newPW" /> <br />
|
||||
<label for="newEmail2">Confirm</label>
|
||||
<input type="email" id="newEmail2" name="newPWConfirm" /> <br />
|
||||
<label for="newPW1">New Password</label>
|
||||
<input type="password" id="newPW1" name="newPW" /> <br />
|
||||
<label for="newPW2">Confirm</label>
|
||||
<input type="password" id="newPW2" name="newPWConfirm" /> <br />
|
||||
<input type="Submit" value="Submit" />
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
|
|
Loading…
Reference in a new issue