mirror of
https://github.com/donl/gPanel.git
synced 2026-06-30 06:12:06 -06:00
resolve some conflicts
This commit is contained in:
parent
6813915e84
commit
9c0a107cb1
2 changed files with 60 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ See guidelines from gPanel
|
|||
|
||||
Layout and Components
|
||||
```shell
|
||||
gPanel/document_roots/webhost/index.html
|
||||
gPanel/document_roots/webhost/ePanel.html
|
||||
```
|
||||
|
||||
Styles
|
||||
|
|
|
|||
59
document_roots/webhost/index.html
Normal file
59
document_roots/webhost/index.html
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Private Test</title>
|
||||
<link rel="icon" type="image/x-icon" href="https://play.golang.org/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<form id="authForm" method="POST" action="authentication">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">gPanel Login</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type="text" placeholder="username..." name="user"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td><input type="password" placeholder="password..." name="pass"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" value="Login"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var form = document.getElementById('authForm');
|
||||
|
||||
form.onsubmit = function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var formData = {};
|
||||
for(var i = 0, ii = form.length; i < ii; i++) {
|
||||
var input = form[i];
|
||||
if(input.name) {
|
||||
formData[input.name] = input.value;
|
||||
}
|
||||
}
|
||||
formData['redirect'] = 'ePanel.html';
|
||||
console.log(formData); //debugging
|
||||
console.log(form.action);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open(form.method, form.action, true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
|
||||
xhr.send(JSON.stringify(formData));
|
||||
|
||||
xhr.onloadend = function() {
|
||||
console.log(xhr.status);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue