diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-20 14:12:52 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-20 14:12:52 -0500 |
| commit | 83796d4e7fcc412c435a37992f9827ac0f4ec4af (patch) | |
| tree | 79e4de2908831887b021b8000d592289537d59e1 /StoneIsland/www/js/lib | |
| parent | ce2d1c701625a08f2b42a81cbac8a7566f8d9e2e (diff) | |
extend w/ prototype
Diffstat (limited to 'StoneIsland/www/js/lib')
| -rw-r--r-- | StoneIsland/www/js/lib/account/ProfileView.js | 5 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/auth/SignupView.js | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js index f03572dc..3c37c835 100644 --- a/StoneIsland/www/js/lib/account/ProfileView.js +++ b/StoneIsland/www/js/lib/account/ProfileView.js @@ -23,8 +23,9 @@ var ProfileView = FormView.extend({ }, validate_fields: function(errors){ - if (data.Password && ! data.Password2) { errors.push("Password2", "Please enter your new password.") } - if (data.Password && data.Password.length < 7) { errors.push("Password", "Password must be 7 characters or more.") } + if (! data.CurrentPassword && data.NewPassword) { errors.push("CurrentPassword", "Please enter your current password.") } + if (data.CurrentPassword && ! data.NewPassword) { errors.push("NewPassword", "Please enter your new password.") } + if (data.NewPassword && data.NewPassword.length < 7) { errors.push("CurrentPassword", "New password must be 7 characters or more.") } }, success: function(data){ diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index 6ca1ccba..3ad84cc9 100644 --- a/StoneIsland/www/js/lib/auth/SignupView.js +++ b/StoneIsland/www/js/lib/auth/SignupView.js @@ -36,11 +36,13 @@ var SignupView = FormView.extend({ 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.") } if (! data.YooxLetter) { data.YooxLetter = "false" } - if (! data.DataProfiling) { data.DataProfiling = "false" } }, privacy_link: function(){ + // rewrite app.privacy instance temporarily app.privacy.back = function(){ app.router.go("account/signup") } @@ -51,14 +53,16 @@ var SignupView = FormView.extend({ }, success: function(data){ + console.log('success', data) app.account.logged_in() }, error: function(data){ + console.log('error', data) }, cancel: function(){ - auth.defer_add_to_cart = null + auth.deferred_product = null }, /* |
