summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorkaeff <hi@kaeff.net>2015-09-14 15:42:31 +0200
committerankonym <ankonym@gmail.com>2015-09-28 15:12:44 +0200
commitfc7cd96591c383ba4f0a2c1e0c7c63095fbe5a4b (patch)
tree0de5891e2f7ad6023ae7b7cbcb0927cafe5cd3a6 /app/assets/javascripts
parente6e1187fdc44766aa4336e05aa12d4e74db65d1d (diff)
Move account form info from srp_js into leap_web
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/users.js25
1 files changed, 24 insertions, 1 deletions
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();