From f6e7c07078252d72b0c7725350a83adfff740b99 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 30 Nov 2015 23:19:28 -0500 Subject: plugins --- StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (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 999e8d65..da25fefc 100644 --- a/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js +++ b/StoneIsland/platforms/ios/www/js/lib/account/ProfileView.js @@ -5,6 +5,8 @@ var ProfileView = FormView.extend({ events: { }, + action: sdk.account.update, + initialize: function(){ this.$form = this.$("form") this.$msg = this.$(".msg") @@ -30,7 +32,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.Gender === "NONE") { errors.push([ "Gender", "Please supply your gender." ]) } + // if (data.Gender === "NONE") { errors.push([ "Gender", "Please supply your gender." ]) } }, finalize: function(data){ @@ -50,7 +52,8 @@ var ProfileView = FormView.extend({ }) } - var submissible_data = _.pick(data, "Name Surname BirthDay Gender YooxLetter".split(" ")) + var submissible_data = _.pick(data, "Name Surname BirthDay YooxLetter".split(" ")) + submissible_data.Gender = "U" // submissible_data.idUser = auth.user_id // submissible_data.AccessToken = auth.access_token // submissible_data.Premium = "false" -- cgit v1.2.3-70-g09d2