commit:27a22160ddd88569f91d7f9144953db4102179dd
author:Chip Black
committer:Chip Black
date:Thu May 24 23:21:21 2018 -0500
parents:b8a2cd6f2b0905067a01ec9b39a6a28af73873ca
Require data storage consent before signup
diff --git a/www/css/blerg.css b/www/css/blerg.css
line changes: +9/-0
index 48b63f9..2c03dbe
--- a/www/css/blerg.css
+++ b/www/css/blerg.css
@@ -514,6 +514,10 @@ h1, h2, h3 {
 	color: black;
 }
 
+.blerg-dialog a {
+	color: inherit;
+}
+
 .blerg-error {
 	color: red;
 	font-weight: bold;
@@ -562,3 +566,8 @@ footer a {
 .enyo-no-touch-action#blerg {
     -ms-touch-action: pan-y;
 }
+
+.checkbox-label {
+  width: calc(100% - 40px);
+  margin-left: 8px;
+}

diff --git a/www/jssrc/blerg/SignupDialog.js b/www/jssrc/blerg/SignupDialog.js
line changes: +12/-0
index 14602f6..47c54db
--- a/www/jssrc/blerg/SignupDialog.js
+++ b/www/jssrc/blerg/SignupDialog.js
@@ -15,6 +15,14 @@ enyo.kind({
             ]},
             {kind: "onyx.InputDecorator", components: [
                 {name: "password", kind: "onyx.Input", placeholder: "Password", type: "password"}
+            ]},
+            {kind: "onyx.InputDecorator", components: [
+                {name: "dataConsent", kind: "onyx.Checkbox"},
+                {classes: "checkbox-label", components: [
+                    {tag: null, content: "I consent to have my data stored in accordance with the "},
+                    {kind: "blerg.Link", content: "Privacy and Data Policies", href: "/doc/privacy_data.html"},
+                    {tag: null, content: "."}
+                ]}
             ]}
         ]},
         {name: "message", tag: "p", content: "No, really, that's all I need. I don't want to send you email. It's too much work to program in email updates. :-P"},
@@ -26,6 +34,10 @@ enyo.kind({
          onSignupFailure: "signupFailure"}
     ],
     signupClick: function() {
+        if (!this.$.dataConsent.getValue()) {
+            alert('You must consent to data storage to sign up.');
+            return;
+        }
         this.$.signupButton.setDisabled(true);
         this.$.spinner.show();
         this.$.spinner.start();