summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/auth
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-21 17:45:29 -0500
committerJules Laplace <jules@okfoc.us>2015-11-21 17:45:29 -0500
commitd6eea989f63e1e51563daa64873ce33166bc28c0 (patch)
tree9431419465c7151a0927ec84970befc696581380 /StoneIsland/www/js/lib/auth
parentc223032bbd67fe5b6ad1334ce81a3f51a7631bfc (diff)
testin login stuff..
Diffstat (limited to 'StoneIsland/www/js/lib/auth')
-rw-r--r--StoneIsland/www/js/lib/auth/LoginView.js2
-rw-r--r--StoneIsland/www/js/lib/auth/SignupView.js16
2 files changed, 12 insertions, 6 deletions
diff --git a/StoneIsland/www/js/lib/auth/LoginView.js b/StoneIsland/www/js/lib/auth/LoginView.js
index c4ec8870..1e0f3b7a 100644
--- a/StoneIsland/www/js/lib/auth/LoginView.js
+++ b/StoneIsland/www/js/lib/auth/LoginView.js
@@ -36,6 +36,8 @@ var LoginView = FormView.extend({
},
error: function(data){
+ this.$msg.html("There was an error logging you in. Bad password?")
+ this.$msg.addClass('alert-notice')
},
cancel: function(){
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js
index 3ad84cc9..a29b4657 100644
--- a/StoneIsland/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/www/js/lib/auth/SignupView.js
@@ -32,13 +32,17 @@ var SignupView = FormView.extend({
"DataProfiling": "You must agree to data profiling.",
},
- validate_fields: function(errors){
- if (data.Password.length < 7) { errors.push("Password", "Password must be 7 characters or more.") }
- if (data.Password !== data.Password2) { errors.push("Password2", "Passwords don't match.") }
- if (data.Email !== data.ConfirmEmail) { errors.push("ConfirmEmail", "Email addresses don't match.") }
- if (data.DataProfiling !== "true") { errors.push("DataProfiling", "You must consent to use this service.") }
- if (data.DataProfiling2 !== "true") { errors.push("DataProfiling2", "You must consent to use this service.") }
+ validate_fields: function(data, errors){
+ if (data.Password.length < 7) { errors.push([ "Password", "Password must be 7 characters or more." ]) }
+ if (data.Password !== data.Password2) { errors.push([ "Password2", "Passwords don't match." ]) }
+ if (data.Email.toLowerCase() !== data.ConfirmEmail.toLowerCase()) { errors.push([ "ConfirmEmail", "Email addresses don't match." ]) }
+ if (data.DataProfiling !== "true") { errors.push([ "DataProfiling", "You must consent to use this service." ]) }
+ if (data.DataProfiling2 !== "true") { errors.push([ "DataProfiling2", "You must consent to use this service." ]) }
if (! data.YooxLetter) { data.YooxLetter = "false" }
+
+ delete data.DataProfiling2
+ delete data.ConfirmEmail
+ console.log(data)
},
privacy_link: function(){