Improvements in login UI

This commit is contained in:
Junaid Ali 2019-04-29 13:36:04 +01:00 committed by GitHub
parent 3704dc25ff
commit 587d63217a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 52 additions and 18 deletions

View File

@ -50,23 +50,57 @@ class AppHandler(BaseHTTPRequestHandler):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv=Content-Type content="text/html;charset=UTF-8">
<title>Auth form example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
form {
border: 2px solid #f1f1f1;
width: 60%;
margin: auto;
}
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}
h2 {
text-align: center;
}
button:hover {
opacity: 0.8;
}
.container {
padding: 30px;
}
</style>
</head>
<body>
<form action="/login" method="post">
<table>
<tr>
<td>Username: <input type="text" name="username"/></td>
<tr>
<td>Password: <input type="text" name="password"/></td>
<tr>
<td><input type="submit" value="Login"></td>
</table>
<h2>Authentication with LDAP Server</h2>
<form action="/login", method="post">
<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<button type="submit">Login</button>
</div>
<input type="hidden" name="target" value="TARGET">
</form>
</body>
</html>"""
</html>
"""
self.send_response(200)
self.end_headers()