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