Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Commit

Permalink
Pressing enter in the guest login form should submit the login.
Browse files Browse the repository at this point in the history
  • Loading branch information
fqueze committed Feb 6, 2013
1 parent 2784682 commit 39056fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions static/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,19 @@ function callPerson(aPerson, aAudioCall) {

function startGuest() {
$("#signin").hide();
$("#guest").html(
'<input type="text" id="user"/>' +
'<input type="button" value="Login" onclick="javascript:guestLogin();"/>'
$("#guest").html('<form onsubmit="javascript:guestLogin(event);">' +
' <input type="text" id="user"/>' +
' <input type="submit" value="Login"/>' +
'</form>'
);
$("#user").focus();
}

function guestLogin() {
function guestLogin(event) {
var user = $("#user").attr("value");
remoteLogin({assertion: user, fake: true});
gFake = true;
event.preventDefault();
}

function signedIn(aEmail) {
Expand Down

0 comments on commit 39056fb

Please sign in to comment.