diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-01-07 16:56:05 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-01-07 16:56:05 +0000 |
commit | 7981e2acd299846bd4aede377d4ade54e1a0fac3 (patch) | |
tree | 1cdfaa38e7f6a85550871857d415c9cb20b29022 | |
parent | 0b7ef6ca8849a1ecc4ad530ea679ca3c2dc62535 (diff) |
Redirect back to summary page if you change body on Zurich report edit.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 68115c71c..02bf97f00 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -722,6 +722,15 @@ sub report_edit : Path('report_edit') : Args(1) { # do this here otherwise lastupdate and confirmed times # do not display correctly $problem->discard_changes; + + if ( $c->cobrand->moniker eq 'zurich' && $c->req->param('body') ) { + my $problem_body = $c->req->param('body'); + my $admin_body = $c->stash->{body}; + if ($admin_body ne $problem_body) { + $c->detach('index'); + } + } + } } |