aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-14 17:10:08 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-14 17:10:08 +0000
commite9e56af843d7527a9b53f1615e88edaff06578f9 (patch)
treed3b6ecc8c3c091d08fe1180fa280df5558074263
parentb5f24d9b11177ab3c559c13da6065518ac3507d1 (diff)
Store and show what was originally entered in the details box.
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html6
-rw-r--r--templates/web/zurich/admin/report_edit.html6
3 files changed, 12 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index c67d946ad..4857dde03 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -191,6 +191,8 @@ sub admin_report_edit {
$extra->{internal_notes} = $c->req->param('internal_notes');
$extra->{publish_photo} = $c->req->params->{publish_photo} || 0;
$extra->{third_personal} = $c->req->params->{third_personal} || 0;
+ # Make sure we have a copy of the original detail field
+ $extra->{original_detail} = $problem->detail unless $extra->{original_detail};
$problem->extra( { %$extra } );
# Workflow things
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
index 9a1df84e5..6c378820d 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -13,7 +13,11 @@
[%- cobrand_data = problem.cobrand_data %]
[%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
<li><a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% loc('View report on site' )%]</a></li>
-<li>[% loc('Details:') %] [% problem.detail | html %]</li>
+<li>[% loc('Details:') %] [% problem.detail | html %]
+[% IF problem.extra.original_detail %]
+<br>[% loc('originally entered') %]: &ldquo;[% problem.extra.original_detail | html %]&rdquo;
+[% END %]
+</li>
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %]) ([% loc('originally entered') %] &lsquo;[% problem.postcode | html %]&rsquo;, [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('Category:') %] [% problem.category | html %] </li>
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index 08dd94e52..f13a4e9fb 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -19,7 +19,11 @@
<li><a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% loc('View report on site' )%]</a></li>
<li><label for='title'>[% loc('Subject:') %]</label> <input size=60 type='text' id='title' name='title' value='[% problem.title | html %]'></li>
<li><label for='detail'>[% loc('Details:') %]</label>
-<textarea name='detail' id='detail' cols=60 rows=5>[% problem.detail | html %]</textarea></li>
+<textarea name='detail' id='detail' cols=60 rows=5>[% problem.detail | html %]</textarea>
+[% IF problem.extra.original_detail %]
+[% loc('originally entered') %]: &ldquo;[% problem.extra.original_detail | html %]&rdquo;
+[% END %]
+</li>
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %]) ([% loc('originally entered') %] &lsquo;[% problem.postcode | html %]&rsquo;, [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('Name:') %] [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li>