diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bromley.pm | 12 | ||||
-rw-r--r-- | t/app/controller/report_new.t | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index f28d37989..91580f05a 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -183,7 +183,7 @@ generally required to stash sub setup_request : Private { my ( $self, $c ) = @_; - $c->stash->{contact_email} = $c->cobrand->contact_email; + $c->stash->{contact_email} = $c->cobrand->contact_email( 'contact' ); $c->stash->{contact_email} =~ s/\@/@/; for my $param (qw/em subject message/) { @@ -205,7 +205,7 @@ Sends the email sub send_email : Private { my ( $self, $c ) = @_; - my $recipient = $c->cobrand->contact_email(); + my $recipient = $c->cobrand->contact_email( 'contact' ); my $recipient_name = $c->cobrand->contact_name(); $c->stash->{host} = $c->req->header('HOST'); diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm index 369e15ff0..d09937ac2 100644 --- a/perllib/FixMyStreet/Cobrand/Bromley.pm +++ b/perllib/FixMyStreet/Cobrand/Bromley.pm @@ -11,6 +11,10 @@ sub council_area { return 'Bromley'; } sub council_name { return 'Bromley Council'; } sub council_url { return 'bromley'; } +sub base_url { + 'https://fix.bromley.gov.uk'; +} + sub path_to_web_templates { my $self = shift; return [ @@ -68,5 +72,13 @@ sub process_extras { $self->SUPER::process_extras( @_, [ 'first_name', 'last_name' ] ); } +sub contact_email { + my $self = shift; + my $type = shift || ''; + return join( '@', 'info', 'bromley.gov.uk' ) if $type eq 'contact'; + return $self->next::method(); +} +sub contact_name { 'Bromley Council (do not reply)'; } + 1; diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 74355c2d4..29fb650e5 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -919,7 +919,7 @@ for my $test ( ok $email, "got an email"; like $email->body, qr/confirm the problem/i, "confirm the problem"; - my ($url) = $email->body =~ m{(http://\S+)}; + my ($url) = $email->body =~ m{(https?://\S+)}; ok $url, "extracted confirm url '$url'"; # confirm token in order to update the user details |