diff options
Diffstat (limited to 'app/assets/javascripts')
m--------- | app/assets/javascripts/srp | 0 | ||||
-rw-r--r-- | app/assets/javascripts/users.js | 25 |
2 files changed, 24 insertions, 1 deletions
diff --git a/app/assets/javascripts/srp b/app/assets/javascripts/srp -Subproject 8f33d32d40b1e21ae7fb9a92c78a275422af421 +Subproject 9e1a41733468d4a3f5102b04277b9cd7b52d0a4 diff --git a/app/assets/javascripts/users.js b/app/assets/javascripts/users.js index e0f1c9d..5217942 100644 --- a/app/assets/javascripts/users.js +++ b/app/assets/javascripts/users.js @@ -88,11 +88,34 @@ } }; + var account = { + + // Returns the user's identity + login: function() { + return document.getElementById("srp_username").value; + }, + + // Returns the password currently typed in + password: function() { + return document.getElementById("srp_password").value; + }, + + // The user's id + id: function() { + return document.getElementById("user_param").value; + }, + + // Returns the invite code currently typed in + loginParams: function () { + return { "invite_code": document.getElementById("srp_invite_code").value }; + } + } + // // PUBLIC FUNCTIONS // - srp.session = new srp.Session(); + srp.session = new srp.Session(account); srp.signedUp = function() { return srp.login(); |