aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/eastsussex/base.scss8
-rw-r--r--web/cobrands/eastsussex/report-form.js22
2 files changed, 30 insertions, 0 deletions
diff --git a/web/cobrands/eastsussex/base.scss b/web/cobrands/eastsussex/base.scss
index 6285b8662..7e9c57b06 100644
--- a/web/cobrands/eastsussex/base.scss
+++ b/web/cobrands/eastsussex/base.scss
@@ -234,3 +234,11 @@ styling, but this doesn't dtrt with span, so adding ourselves */
z-index: 1;
}
}
+
+.label-warning {
+ background: lighten(#ff3300, 20%);
+ color: white;
+ font-size: 90%;
+ padding: 2px;
+ cursor: default;
+}
diff --git a/web/cobrands/eastsussex/report-form.js b/web/cobrands/eastsussex/report-form.js
new file mode 100644
index 000000000..4e01572f7
--- /dev/null
+++ b/web/cobrands/eastsussex/report-form.js
@@ -0,0 +1,22 @@
+$(function () {
+ setup_anonymous_checkbox( $('#form_sign_in_no') );
+ setup_anonymous_checkbox( $('#form-box--logged-in-name') );
+ setup_anonymous_checkbox( $('#update_form') );
+
+ $('.public-warning').attr({ 'title': 'This information will be be visible to the public on the report' });
+});
+
+function setup_anonymous_checkbox (div) {
+ var label = div.find( '.name-warning' );
+ checkbox = div.find('input[type=checkbox]');
+
+ checkbox.change( function () {
+ var v = $(this).attr('checked');
+ if (v) {
+ label.show();
+ }
+ else {
+ label.hide();
+ }
+ });
+}