summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js')
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/ProfileView.js4
1 files changed, 4 insertions, 0 deletions
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." ]) }
},