aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md8
-rw-r--r--perllib/FixMyStreet/Cobrand/BathNES.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm2
-rw-r--r--t/app/controller/report_new_text.t2
-rw-r--r--t/app/controller/report_updates.t6
-rw-r--r--templates/web/base/report/_show_name_label.html1
-rw-r--r--templates/web/base/user/_anonymity.html4
-rw-r--r--templates/web/bathnes/report/_show_name_label.html1
10 files changed, 15 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abe507e60..50300f06d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
while reporting, to discourage duplicate reports. #2386
- Front end improvements:
- Track map state in URL to make sharing links easier. #2242
+ - Default to unchecked for show name checkbox. #347
- Admin improvements:
- Include moderation history in report updates. #2379
- Allow moderation to potentially change state. #2381
@@ -23,9 +24,16 @@
- Fix issue with Open311 codes starting with ‘_’. #2391
- Add parameter to URL when “Show older” clicked. #2397
- Don't ask for email on alert signup if logged in. #2402
+ - Filter out hidden reports from top 5 list. #1957
+ - Add space below "map page" contents on narrow screens.
- Development improvements:
- Make front page cache time configurable.
- Better working of /fakemapit/ under https.
+ - Backwards incompatible changes:
+ - If you wish the default for the showname checkbox to be checked,
+ add `sub default_show_name { 1 }` to your cobrand file.
+ - The admin body and user sections have been refactored – if you have
+ custom templates/code, you may need to update links to those.
* v2.5 (21st December 2018)
- Front end improvements:
diff --git a/perllib/FixMyStreet/Cobrand/BathNES.pm b/perllib/FixMyStreet/Cobrand/BathNES.pm
index 800ca88fa..e3ae6763f 100644
--- a/perllib/FixMyStreet/Cobrand/BathNES.pm
+++ b/perllib/FixMyStreet/Cobrand/BathNES.pm
@@ -91,8 +91,6 @@ sub send_questionnaires { 0 }
sub enable_category_groups { 1 }
-sub default_show_name { 0 }
-
sub default_map_zoom { 3 }
sub map_js_extra {
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index 553d716c5..950431e85 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -46,8 +46,6 @@ sub problems_on_map_restriction {
return $rs->to_body($tfl ? [ $self->body->id, $tfl->id ] : $self->body);
}
-sub default_show_name { 0 }
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 4c5d29ee5..a7b5273ff 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -1000,9 +1000,7 @@ Returns true if the show name checkbox should be ticked by default.
=cut
-sub default_show_name {
- 1;
-}
+sub default_show_name { 0 }
=item report_check_for_errors
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index b8dc49f72..5def2bb61 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -73,8 +73,6 @@ sub default_map_zoom { return 3; }
# let staff hide OCC reports
sub users_can_hide { return 1; }
-sub default_show_name { 0 }
-
sub lookup_by_ref_regex {
return qr/^\s*((?:ENQ)?\d+)\s*$/;
}
diff --git a/t/app/controller/report_new_text.t b/t/app/controller/report_new_text.t
index e6f0a9017..fad7fb6ab 100644
--- a/t/app/controller/report_new_text.t
+++ b/t/app/controller/report_new_text.t
@@ -324,7 +324,7 @@ subtest "test report creation for a user who is logged in" => sub {
{
title => '',
detail => '',
- may_show_name => '1',
+ may_show_name => undef,
name => 'Joe Bloggs',
email => 'joe@example.net',
photo1 => '',
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index 76594a74a..8ff5b4d24 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -368,7 +368,7 @@ for my $test (
initial_values => {
name => '',
username => '',
- may_show_name => 1,
+ may_show_name => undef,
add_alert => 1,
photo1 => '',
photo2 => '',
@@ -393,7 +393,7 @@ for my $test (
initial_values => {
name => '',
username => '',
- may_show_name => 1,
+ may_show_name => undef,
add_alert => 1,
photo1 => '',
photo2 => '',
@@ -496,7 +496,7 @@ for my $test (
initial_values => {
name => '',
username => '',
- may_show_name => 1,
+ may_show_name => undef,
add_alert => 1,
photo1 => '',
photo2 => '',
diff --git a/templates/web/base/report/_show_name_label.html b/templates/web/base/report/_show_name_label.html
index 1e62b5fc0..f57ba4295 100644
--- a/templates/web/base/report/_show_name_label.html
+++ b/templates/web/base/report/_show_name_label.html
@@ -1,4 +1,3 @@
-[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
<label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
diff --git a/templates/web/base/user/_anonymity.html b/templates/web/base/user/_anonymity.html
index cc3630f16..ee8882dd8 100644
--- a/templates/web/base/user/_anonymity.html
+++ b/templates/web/base/user/_anonymity.html
@@ -1,9 +1,9 @@
[%
- IF c.cobrand.default_show_name AND anonymous=='';
+ IF anonymous=='';
IF c.user_exists;
SET name_public = NOT c.user.latest_anonymity;
ELSE;
- SET name_public = 1;
+ SET name_public = c.cobrand.default_show_name;
END;
ELSE;
SET name_public = anonymous==0;
diff --git a/templates/web/bathnes/report/_show_name_label.html b/templates/web/bathnes/report/_show_name_label.html
index 8e58f816a..20f28f099 100644
--- a/templates/web/bathnes/report/_show_name_label.html
+++ b/templates/web/bathnes/report/_show_name_label.html
@@ -1,4 +1,3 @@
-[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
<label class="inline" for="form_may_show_name">Tick here to show my name publicly</label>