[Modify user] Refactoring email change page to be a general modify page
#1
This commit is contained in:
parent
13270f2f4e
commit
e689c05fca
1 changed files with 10 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
<html lang="en-ie">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Email change</title>
|
||||
<title>Modify user</title>
|
||||
<link rel="icon" type="image/png" href="images/favicon/favicon-16x16.png" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -11,8 +11,14 @@
|
|||
<input type="text" id="user" name="user" /> <br />
|
||||
<label for="pass">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="field">Field</label>
|
||||
<select id="field">
|
||||
<option value="" selected="selected">Please select an option</option>
|
||||
<option value="email">Email</option>
|
||||
</select>
|
||||
<br />
|
||||
<label for="value">Value</label>
|
||||
<input type="text" id="value" name="value" /> <br />
|
||||
<input type="Submit" value="Submit" />
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
|
@ -28,7 +34,7 @@
|
|||
const formData = new FormData(formEl);
|
||||
const user = formData.get("user");
|
||||
const pass = formData.get("pass");
|
||||
const newEmail = formData.get("newEmail");
|
||||
const newEmail = formData.get("value");
|
||||
const object = {user: user, pass: pass, field: "mail", value: newEmail}
|
||||
fetch('https://api.sso.skynet.ie/ldap/update', {
|
||||
method: 'POST',
|
||||
|
|
Loading…
Reference in a new issue