diff options
Diffstat (limited to 'StoneIsland/www/js/lib/auth/SignupView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/auth/SignupView.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index 18fecebb..8ae47728 100755 --- a/StoneIsland/www/js/lib/auth/SignupView.js +++ b/StoneIsland/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.", @@ -77,15 +77,18 @@ var SignupView = FormView.extend({ } 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) { |
