Skip to content

Commit

Permalink
add input for username and password to connection dialog
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@13869 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 25, 2016
1 parent d3a8ed0 commit 55651ea
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ <h2 class="form-signin-heading">Xpra HTML5 Client</h2>

<div class="form-group form-inline">
<label class="sr-only" for="server">Server</label>
<input type="text" class="form-control" id="server" placeholder="Server">
<input type="text" class="form-control" id="server" placeholder="Server" maxlength="256">
<label class="sr-only" for="port">Port</label>
<input type="text" class="form-control" id="port" placeholder="Port">
<input type="text" class="form-control" id="port" placeholder="Port" size="5" maxlength="5">
<br />
<label class="sr-only" for="username">username</label>
<input type="text" class="form-control" id="username" placeholder="Username" size="16" maxlength="256">
<label class="sr-only" for="password">password</label>
<input type="text" class="form-control" id="password" placeholder="Password" size="16" maxlength="256">
</div>

<div class="form-group form-inline">
Expand Down Expand Up @@ -200,11 +205,17 @@ <h4 class="panel-title">Advanced options</h4>

function doConnect() {
var server = document.getElementById("server").value;
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
var port = parseInt(document.getElementById("port").value);
var encoding = document.getElementById("encoding").value;
var keyboard_layout = document.getElementById("keyboard_layout").value;
// url to client
var url = "/index.html?server="+encodeURIComponent(server)+"&port="+port+"&encoding="+encodeURIComponent(encoding)+"&keyboard_layout="+encodeURIComponent(keyboard_layout)+"&submit=true";
if (username.length>0)
url += "&username="+encodeURIComponent(username);
if (password.length>0)
url += "&password="+encodeURIComponent(password);
// check options
var normal_fullscreen = document.getElementById("normal_fullscreen").checked;
if(normal_fullscreen) {
Expand Down

0 comments on commit 55651ea

Please sign in to comment.