aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2012-01-27 17:10:33 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2012-01-27 17:10:33 +0000
commita176268063145c9a2d5359c24da0143fb4fe7520 (patch)
tree5d87cc00381b354f7ece06b4d33949020e7e444f
parent45995de500ca04ad21a78cf00f2a9b6420b8c538 (diff)
Remember checkbox change even if name is blank, for #188.
-rw-r--r--t/app/controller/report_new.t4
-rw-r--r--templates/web/default/report/new/fill_in_details_form.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index a4e1c99b4..076813868 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -80,7 +80,7 @@ foreach my $test (
],
},
{
- msg => 'may_show_name defaults to true',
+ msg => 'may_show_name is remembered',
pc => 'SW1A 1AA',
fields => {
title => '',
@@ -95,7 +95,7 @@ foreach my $test (
password_register => '',
remember_me => undef,
},
- changes => { may_show_name => '1' },
+ changes => {},
errors => [
'Please enter a subject',
'Please enter some details',
diff --git a/templates/web/default/report/new/fill_in_details_form.html b/templates/web/default/report/new/fill_in_details_form.html
index b6b77c75a..2809b9c0e 100644
--- a/templates/web/default/report/new/fill_in_details_form.html
+++ b/templates/web/default/report/new/fill_in_details_form.html
@@ -206,7 +206,7 @@
<div class="checkbox">
[%# if there is nothing in the name field then set check box as default on form %]
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous || !report.name %]>
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
<label for="form_may_show_name">[% loc('Show my name publicly') %]</label>
<br><small>[% loc('(we never show your email address or phone number)') %]</small>
</div>