From 9d50dcb1c8947d269df2af3616b9f012dbe63c3e Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 6 Nov 2017 15:33:43 +0000 Subject: do not override template when displaying body contacts as text move setting the body template to before `fetch_contacts` so it doesn't override setting the text only email address template. Fixes #1895 --- perllib/FixMyStreet/App/Controller/Admin.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm') diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 453ebed82..05953974e 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -608,9 +608,12 @@ sub edit_body : Chained('body') : PathPart('') : Args(0) { $c->set_param('posted', ''); $c->forward('fetch_translations'); - $c->forward('fetch_contacts'); + # don't set this last as fetch_contacts might over-ride it + # to display email addresses as text $c->stash->{template} = 'admin/body.html'; + $c->forward('fetch_contacts'); + return 1; } -- cgit v1.2.3