summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/auth/SignupView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-12-02 17:37:35 +0100
committerJules Laplace <julescarbon@gmail.com>2019-12-02 17:37:35 +0100
commit8d4ace1dbea3b38e08a2fa369cf988eaac5b3dba (patch)
tree7a1e600400383404c1787a42f7568a8d51f5d300 /StoneIsland/www/js/lib/auth/SignupView.js
parent1420584ae4c41d4f89743c512b00befe814b54bb (diff)
fixing more stuff
Diffstat (limited to 'StoneIsland/www/js/lib/auth/SignupView.js')
-rwxr-xr-xStoneIsland/www/js/lib/auth/SignupView.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js
index b16ff887..18fecebb 100755
--- a/StoneIsland/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/www/js/lib/auth/SignupView.js
@@ -63,8 +63,18 @@ 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()
@@ -78,6 +88,12 @@ var SignupView = FormView.extend({
}
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){