From 393dc6eaf8d5a119c9cf71f1f5dac44abf70db59 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 2 Dec 2015 21:00:30 -0500 Subject: build.. --- StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js index 22b310de..bba959bd 100644 --- a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js +++ b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js @@ -4,7 +4,8 @@ var SignupView = FormView.extend({ action: sdk.account.signup, last_data: null, - + +/* test_data: { "Email": "testit.account" + Math.floor(Math.random() * 10000000) + "@yoox.com", "Password": "TestPassword", @@ -16,7 +17,8 @@ var SignupView = FormView.extend({ "DataProfiling": true, "DataProfiling2": true, }, - +*/ + events: { "click .privacy-msg": "privacy_link", "submit form": "save", @@ -47,6 +49,7 @@ var SignupView = FormView.extend({ "Surname": "Please enter your last name.", "Email": "Please enter a valid email address.", "ConfirmEmail": "Please enter a valid email address.", + "BirthDay": "Please enter your birthday.", "Password": "Please enter your password.", "Password2": "Please enter your password again.", "DataProfiling": "You must agree to data profiling.", @@ -97,7 +100,13 @@ var SignupView = FormView.extend({ }, error: function(data){ - console.log('error', data) + try { + data = JSON.parse(data.responseText) + app.signup.show_errors([[ 'Name', data['Error']['Description'] ]]) + } + catch (e) { + app.signup.show_errors([[ 'Name', "There was an unknown error." ]]) + } }, cancel: function(){ -- cgit v1.2.3-70-g09d2