diff options
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js')
| -rw-r--r-- | StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js b/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js index 22f63c53..dfeb4fac 100644 --- a/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js +++ b/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js @@ -13,11 +13,13 @@ var ConsentModal = View.extend({ this.$form = this.$(".form") this.$msg = this.$(".msg") this.$checkbox = this.$("[name=AccountTermsConsent]") + this.$consentError = this.$("#consent_error") }, check: function(){ var status = localStorage.getItem('account_terms.consent') if (status !== 'true') { + app.demand_consent = true this.show() return true } else { @@ -55,16 +57,17 @@ var ConsentModal = View.extend({ changeConsent: function(){ var state = this.$checkbox.prop("checked") - // if (state) { - // this.$el.addClass('consent-yes').removeClass('consent-no') - // } else { - // this.$el.addClass('consent-no').removeClass('consent-yes') - // } + if (state) { + this.$consentError.removeClass('visible') + } else { + this.$consentError.addClass('visible') + } }, proceed: function(){ var state = this.$checkbox.prop("checked") if (!state) { + this.$consentError.addClass('visible') return } app.demand_consent = false |
