diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-05-06 15:21:54 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-05-06 15:21:54 +0200 |
| commit | 9c18073017b5cc2334bf1867c004bfc74ba5a92a (patch) | |
| tree | 6e0d18d602babd4532499f25224c36aed9af61a5 /StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js | |
| parent | 91eff5910a8a7d55159bdeb0f5b8d4945be0da48 (diff) | |
update build
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js')
| -rwxr-xr-x | StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js index b16ff887..8ae47728 100755 --- a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js +++ b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js @@ -49,7 +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. You must be 18 or older to use the Stone Island app.", + // "BirthDay": "Please enter your birthday. You must be 18 or older to use the Stone Island app.", "Password": "Please enter your password.", "Password2": "Please enter your password again.", "DataProfiling": "You must consent to data profiling to use the Stone Island app.", @@ -63,21 +63,40 @@ var SignupView = FormView.extend({ if (! data.Email.match("@")) { errors.push([ "Email", "Email address is not valid." ]) } if (data.Email.toLowerCase() !== data.ConfirmEmail.toLowerCase()) { errors.push([ "ConfirmEmail", "Email addresses don't match." ]) } // if (data.Gender === "NONE") { errors.push([ "Gender", "Please supply your gender." ]) } - if (data.DataProfiling !== "true") { errors.push([ "DataProfiling", "You must consent to data profiling to use the Stone Island app." ]) } - if (data.GdprTerms !== "true") { errors.push([ "GdprTerms", "You must agree to the Your My Account terms to use the Stone Island app." ]) } + if (data.DataProfiling !== "true") { + errors.push([ "DataProfiling", "You must consent to data profiling to use the Stone Island app." ]) + setTimeout(function(){ + this.$("#checkbox-shopping-data-profiling-label").closest(".checkbox-row").addClass("error_hilite") + }.bind(this), 10) + } + if (data.GdprTerms !== "true") { + errors.push([ "GdprTerms", "You must agree to the Your My Account terms to use the Stone Island app." ]) + setTimeout(function(){ + this.$("#checkbox-shopping-account-terms").closest(".checkbox-row").addClass("error_hilite") + }.bind(this), 10) + } var now = new Date () - var year = now.getFullYear() + var year = now.getFullYear() - 18 if (! data.BirthDay) { data.BirthDay = year + '-01-01' } // if (data.BirthDay.split('-')[0] || '2018') var birthday = new Date (data.BirthDay) - if (isNaN(birthday) || (new Date () - birthday) / (365*24*60*60*1000) < 18) { - errors.push(['BirthDay', 'You must be 18 or older to use the Stone Island app.']) + if (isNaN(birthday)) { + data['BirthDay'] = '1970-01-01' } + // if (isNaN(birthday) || (new Date () - birthday) / (365*24*60*60*1000) < 18) { + // errors.push(['BirthDay', 'You must be 18 or older to use the Stone Island app.']) + // } data.YooxLetter = this.$("[name=YooxLetter]").prop("checked") + if (!data.YooxLetter) { + errors.push([ "YooxLetter", "You must consent to marketing to use the Stone Island app." ]) + setTimeout(function(){ + this.$("#checkbox-data-profiling").closest(".checkbox-row").addClass("error_hilite") + }.bind(this), 10) + } }, finalize: function(data){ |
