aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--notes/catalyst-master-merge-todos.txt2
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm10
-rw-r--r--templates/web/default/tokens/confirm_problem.html2
3 files changed, 9 insertions, 5 deletions
diff --git a/notes/catalyst-master-merge-todos.txt b/notes/catalyst-master-merge-todos.txt
index a851d0681..ea0ec98cd 100644
--- a/notes/catalyst-master-merge-todos.txt
+++ b/notes/catalyst-master-merge-todos.txt
@@ -1,3 +1 @@
should we ditch flickr import? (does not seem to be getting huge usage and those using it would probably report using another method: http://www.flickr.com/search/?w=all&q=fixmystreet&m=tags)
-
-Add newsletter signup to bottom of problem confirm page
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 75ca4dd81..c8240948d 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -6,6 +6,7 @@ use warnings;
use mySociety::Locale;
use FixMyStreet;
+use CrossSell;
__PACKAGE__->config(
TEMPLATE_EXTENSION => '.html',
@@ -14,7 +15,7 @@ __PACKAGE__->config(
],
ENCODING => 'utf8',
render_die => 1,
- expose_methods => [ 'loc', 'nget', 'tprintf', ],
+ expose_methods => [ 'loc', 'nget', 'tprintf', 'display_crossell_advert' ],
);
=head1 NAME
@@ -78,7 +79,12 @@ sub display_crossell_advert {
my ( $self, $c, $email, $name ) = @_;
return unless $c->cobrand->allow_crosssell_adverts();
- return CrossSell::display_advert( $c->req, $email, $name );
+
+ # fake up the old style $q
+ my $q = { site => $c->cobrand->moniker, };
+ $q->{site} = 'fixmystreet' if $q->{site} eq 'default';
+
+ return CrossSell::display_advert( $q, $email, $name );
}
1;
diff --git a/templates/web/default/tokens/confirm_problem.html b/templates/web/default/tokens/confirm_problem.html
index 23d5f52ee..aeff2cc9c 100644
--- a/templates/web/default/tokens/confirm_problem.html
+++ b/templates/web/default/tokens/confirm_problem.html
@@ -17,6 +17,6 @@
%]
</p>
-[% display_crossell_advert( problem.email, problem.name ) %]
+[% display_crossell_advert( problem.user.email, problem.name ) %]
[% INCLUDE 'footer.html' %]