aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2014-11-13 14:54:07 +0000
committerHakim Cassimally <hakim@mysociety.org>2014-12-02 12:48:00 +0000
commit5b3fff8a3f6bf376422f26ba0ebcab78b3b41fc2 (patch)
tree94a3058fb6782c1a5aa1967908fc645aafd1ee12 /web
parent8fdae5f539efb09604812626809c005234dcef46 (diff)
[EastSussex] UI improvements to encourage good updates
ESCC advised us of concerns that users: * were unaware of how much of their report/update would be visible on the site - make "public" text more visible. - label is presented as fairly flat, with the cursor suppressed (to avoid it looking like a button) but with an explanatory tooltip. The intent is for it to be highly visible, but not too startling. - https://github.com/mysociety/FixMyStreet-Commercial/issues/642 * often comment on an existing report when instead creating a new report would be more appropriate. - Present two buttons, one to create a new report in the same location, another to open the comment box. - (this functionality degrades without Javascript, by simply showing the comment box by default.) - https://github.com/mysociety/FixMyStreet-Commercial/issues/641 Most templates have been split into partials, to avoid long-term forking, however update-form.html is still forked from fixmystreet, which would ideally be fixed in a future commit.
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();
+ }
+ });
+}