summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorazul <azul@leap.se>2015-09-30 10:51:21 +0200
committerazul <azul@leap.se>2015-09-30 10:51:21 +0200
commitd45f6c61f6a13be06f1977b857e0cb31e79c5317 (patch)
treed3089b334c2663ea2fd76cf62dea853bdd57b047 /app/assets/javascripts
parenta894966e425f27c31e7da196658c6ddee3fc3714 (diff)
parentd4f10a8d47572bcab4c44878b952146732d64d2e (diff)
Merge pull request #194 from Alster-Hamburgers/feature/invite_code
Request for feedback on invite code feature
Diffstat (limited to 'app/assets/javascripts')
m---------app/assets/javascripts/srp0
-rw-r--r--app/assets/javascripts/users.js25
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();