diff options
author | louise <louise> | 2009-12-17 14:57:34 +0000 |
---|---|---|
committer | louise <louise> | 2009-12-17 14:57:34 +0000 |
commit | 38a3fd044462011a82b93f269a74618fe2f58046 (patch) | |
tree | e7bf6d0a4b6a5710c377d91cd46fea90f09cd0d6 /web | |
parent | 92995f381c0d5786b8ef04f43d9b7e0e9b17690c (diff) |
Just pass content to template, not markup
Diffstat (limited to 'web')
-rwxr-xr-x | web/contact.cgi | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/web/contact.cgi b/web/contact.cgi index 151f5b55d..c3a1c23b0 100755 --- a/web/contact.cgi +++ b/web/contact.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: contact.cgi,v 1.57 2009-12-16 13:04:47 louise Exp $ +# $Id: contact.cgi,v 1.58 2009-12-17 14:57:34 louise Exp $ use strict; use Standard; @@ -83,12 +83,16 @@ sub contact_submit { }); my $result = mySociety::EmailUtil::send_email($email, $input{em}, $recipient); if ($result == mySociety::EmailUtil::EMAIL_SUCCESS) { - my $out = $q->p(_("Thanks for your feedback. We'll get back to you as soon as we can!")); + my $message = _("Thanks for your feedback. We'll get back to you as soon as we can!"); + my $out = $q->p($message); my $display_advert = Cobrand::allow_crosssell_adverts($cobrand); + my $advert = ''; if ($display_advert) { - $out .= CrossSell::display_advert($q, $input{em}, $input{name}, emailunvalidated=>1 ); + $advert = CrossSell::display_advert($q, $input{em}, $input{name}, emailunvalidated=>1 ); + $out .= $advert; } - my %vars = (message => $out); + my %vars = (message => $message, + advert => $advert); my $template_out = Page::template_include('confirmed-alert', $q, Page::template_root($q), %vars); return $template_out if $template_out; return $out; |