summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/templates/login.html59
1 files changed, 59 insertions, 0 deletions
diff --git a/res/templates/login.html b/res/templates/login.html
new file mode 100644
index 00000000..afcc403f
--- /dev/null
+++ b/res/templates/login.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Rhizi Sandbox Login</title>
+<script src="lib/jquery.js"></script>
+<script type="text/javascript">
+ function submit_login_form() {
+ var data = {
+ username : $('#login_username').val(),
+ password : $('#login_password').val(),
+ };
+
+ // TODO: validate
+
+ $.ajax({
+ type : "POST",
+ data : JSON.stringify(data),
+ dataType : 'json',
+ contentType : "application/json; charset=utf-8"
+ });
+ }
+</script>
+</head>
+
+<body>
+
+ <div id="login_form_panel">
+ <form
+ onsubmit="submit_login_form();"
+ id="login_form">
+ <div id="login_form__heading">Rhizi Sandbox Login</div>
+ <br>
+ <div class="login_form__key">Username:</div>
+ <div class="login_form__value">
+ <input
+ type="text"
+ id="login_username">
+ </div>
+ <br>
+ <div class="login_form__key">Password:</div>
+ <div class="login_form__value">
+ <input
+ type="password"
+ id="login_password">
+ </div>
+ <p>
+ <input
+ type="submit"
+ value="Login">
+ </p>
+ </form>
+ <div id="failed-login">
+ {% if login_failed %}<b>Login Failed</b>{% endif %}
+ </div>
+ </div>
+
+</body>
+</html> \ No newline at end of file