Files
guacamole-client/guacamole/src/main/webapp/index.xhtml
T

121 lines
3.8 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<!--
Guacamole - Clientless Remote Desktop
Copyright (C) 2010 Michael Jumper
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="images/guacamole-logo-64.png"/>
<link rel="stylesheet" type="text/css" href="styles/login.css"/>
<title>Guacamole ${project.version}</title>
</head>
<body>
<div id="login-ui">
<div id="login-dialog-middle">
<div id="login-dialog">
<p id="login-error"></p>
<form id="login-form" action="#" method="post">
<div id="login-fields">
<table>
<tr>
<th>Username</th>
<td><input type="text" name="username" id="username" autofocus="autofocus"/></td>
</tr>
<tr>
<th>Password</th>
<td><input type="password" name="password" id="password"/></td>
</tr>
</table>
<img class="logo" src="images/guacamole-logo-64.png" alt=""/>
</div>
<div id="buttons">
<input type="submit" name="login" id="login" value="Login"/>
</div>
</form>
</div>
<div id="version-dialog">
Guacamole ${project.version}
</div>
</div>
</div>
<!-- Main UI - hidden until login succeeds -->
<div id="connection-list-ui" style="display: none">
<!-- STUB -->
</div>
<!-- Init -->
<script type="text/javascript"> /* <![CDATA[ */
var loginForm = document.getElementById("login-form");
var loginUI = document.getElementById("login-ui");
var display = document.getElementById("display");
// TODO: Get connection list
// On no-auth fail, show login UI
loginForm.onsubmit = function() {
var username = document.getElementById("username");
var password = document.getElementById("password");
var data =
"username=" + encodeURIComponent(username.value)
+ "&password=" + encodeURIComponent(password.value)
try {
// STUB
}
catch (e) {
var loginError = document.getElementById("login-error");
// Display error, reset and refocus password field
loginError.textContent = e.message;
password.value = "";
password.focus();
return false;
}
// On success, hide loginUI, get and show connection list.
return false;
}
/* ]]> */ </script>
</body>
</html>