parent
4a1fb8481b
commit
20e284fb13
1 changed files with 5 additions and 5 deletions
|
@ -8,8 +8,6 @@
|
|||
<body>
|
||||
<h1>Sign-up</h1>
|
||||
<form id="register">
|
||||
<label for="auth">Auth code</label>
|
||||
<input type="text" id="auth" name="auth" /> <br/>
|
||||
<label for="user">Username</label>
|
||||
<input type="text" id="user" name="user" /> <br />
|
||||
<label for="pass">Password</label>
|
||||
|
@ -27,10 +25,12 @@
|
|||
function formHandler(listener){
|
||||
listener.preventDefault();
|
||||
const formData = new FormData(formEl);
|
||||
const auth = formData.get("auth");
|
||||
const url = new URL(window.location.href);
|
||||
const urlParam = new URLSearchParams(url.search);
|
||||
const auth = urlParam.get("auth");
|
||||
const user = formData.get("user");
|
||||
const pass = formData.get("pass");
|
||||
const object = { auth: auth, user: user, pass: pass }
|
||||
const object = { auth: auth, user: user, pass: pass };
|
||||
fetch('https://api.sso.skynet.ie/ldap/new', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(object),
|
||||
|
@ -53,7 +53,7 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
.catch(() => document.getElementById('formStatus').innerHTML = "<span style='background-color: yellow; color: black'>Please try again</span>")
|
||||
.catch(() => document.getElementById('formStatus').innerHTML = "<span style='background-color: yellow; color: black'>Please try again</span>");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue