From 1dfdbf6d09c6b1b80011b98436daa010f10a7be3 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 1 Dec 2015 06:39:46 -0500 Subject: error / thanks styling --- StoneIsland/www/js/lib/auth/SignupView.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'StoneIsland/www/js/lib/auth/SignupView.js') diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index a78af233..bba959bd 100644 --- a/StoneIsland/www/js/lib/auth/SignupView.js +++ b/StoneIsland/www/js/lib/auth/SignupView.js @@ -49,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.", @@ -99,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