From 7a46e7f1fa592658415e0da4fe42033a31ce3951 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 23 Nov 2017 18:30:04 +0100 Subject: new account, date field, fixed --- StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js b/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js index 52ef8056..ee39374b 100755 --- a/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js +++ b/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js @@ -26,6 +26,9 @@ var ProfileView = FormView.extend({ if (auth.user.BirthDay.match(/T/)) { auth.user.BirthDay = auth.user.BirthDay.split("T")[0] } + if (auth.user.BirthDay === '1900-01-01') { + auth.user.BirthDay = '' + } if (auth.user.name && ! auth.user.Name) { auth.user.Name = auth.user.name } @@ -51,6 +54,7 @@ var ProfileView = FormView.extend({ if (! data.CurrentPassword && (data.NewPassword || data.Email !== auth.user.Email)) { 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." ]) } + if (! data.Birthday) data.BirthDay = '1900-01-01' // if (data.Gender === "NONE") { errors.push([ "Gender", "Please supply your gender." ]) } }, -- cgit v1.2.3-70-g09d2