summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/account/ProfileView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/account/ProfileView.js')
-rwxr-xr-xStoneIsland/www/js/lib/account/ProfileView.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js
index f370c055..2b608cb4 100755
--- a/StoneIsland/www/js/lib/account/ProfileView.js
+++ b/StoneIsland/www/js/lib/account/ProfileView.js
@@ -17,6 +17,20 @@ var ProfileView = FormView.extend({
if (! auth.logged_in()) { return app.router.go("intro") }
app.footer.show("SAVE")
document.body.className = "profile"
+ auth.user.DataProfiling2 = auth.user.DataProfiling
+ if (auth.user.BirthDay.match(/T/)) {
+ auth.user.BirthDay = auth.user.BirthDay.split("T")[0]
+ }
+ if (auth.user.name && ! auth.user.Name) {
+ auth.user.Name = auth.user.name
+ }
+ if (auth.user.surname && ! auth.user.Surname) {
+ auth.user.Surname = auth.user.surname
+ }
+ if (auth.user.email && ! auth.user.Email) {
+ auth.user.Email = auth.user.email
+ }
+ console.log(auth.user)
this.preload(auth.user)
this.deferScrollToTop()
},
@@ -63,8 +77,11 @@ var ProfileView = FormView.extend({
// submissible_data.FuriganaSurname = ""
// submissible_data.UserPromocode = ""
submissible_data.BirthDay += "T00:00:00Z"
- submissible_data.YooxLetter = data.YooxLetter || "false"
- submissible_data.DataProfiling = "true"
+ submissible_data.YooxLetter = this.$("[name=YooxLetter]").prop("checked")
+ submissible_data.DataProfiling = this.$("[name=DataProfiling]").prop("checked")
+
+ console.log(data.DataProfiling, submissible_data.DataProfiling)
+ console.log(submissible_data)
return submissible_data
},