aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Contact.pm4
-rw-r--r--perllib/FixMyStreet/App/Controller/Location.pm1
-rw-r--r--perllib/FixMyStreet/App/Controller/Open311.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm12
4 files changed, 15 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm
index 926a3f2a5..c8b0c2046 100644
--- a/perllib/FixMyStreet/App/Controller/Contact.pm
+++ b/perllib/FixMyStreet/App/Controller/Contact.pm
@@ -184,7 +184,7 @@ generally required to stash
sub setup_request : Private {
my ( $self, $c ) = @_;
- $c->stash->{contact_email} = $c->cobrand->contact_email( 'contact' );
+ $c->stash->{contact_email} = $c->cobrand->contact_email;
$c->stash->{contact_email} =~ s/\@/@/;
for my $param (qw/em subject message/) {
@@ -206,7 +206,7 @@ Sends the email
sub send_email : Private {
my ( $self, $c ) = @_;
- my $recipient = $c->cobrand->contact_email( 'contact' );
+ my $recipient = $c->cobrand->contact_email;
my $recipient_name = $c->cobrand->contact_name();
$c->stash->{host} = $c->req->header('HOST');
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm
index e8bf2cd1c..fd3fadd9f 100644
--- a/perllib/FixMyStreet/App/Controller/Location.pm
+++ b/perllib/FixMyStreet/App/Controller/Location.pm
@@ -5,6 +5,7 @@ use namespace::autoclean;
BEGIN {extends 'Catalyst::Controller'; }
use Encode;
+use FixMyStreet::Geocode;
=head1 NAME
diff --git a/perllib/FixMyStreet/App/Controller/Open311.pm b/perllib/FixMyStreet/App/Controller/Open311.pm
index 040b0d3e6..3382c0cea 100644
--- a/perllib/FixMyStreet/App/Controller/Open311.pm
+++ b/perllib/FixMyStreet/App/Controller/Open311.pm
@@ -100,7 +100,7 @@ sub error : Private {
sub get_discovery : Private {
my ( $self, $c ) = @_;
- my $contact_email = $c->config->{CONTACT_EMAIL};
+ my $contact_email = $c->cobrand->contact_email;
my $prod_url = 'http://www.fiksgatami.no/open311';
my $test_url = 'http://fiksgatami-dev.nuug.no/open311';
my $prod_changeset = '2011-04-08T00:00:00Z';
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 169c3d152..9194f5318 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -4,7 +4,6 @@ use Moose;
use namespace::autoclean;
BEGIN { extends 'Catalyst::Controller'; }
-use FixMyStreet::Geocode;
use Encode;
use List::MoreUtils qw(uniq);
use POSIX 'strcoll';
@@ -788,6 +787,7 @@ sub process_report : Private {
'category', #
'subcategory', #
'partial', #
+ 'service', #
);
# load the report
@@ -812,6 +812,9 @@ sub process_report : Private {
}
$report->detail( $detail );
+ # mobile device type
+ $report->service( $params{service} ) if $params{service};
+
# set these straight from the params
$report->category( _ $params{category} ) if $params{category};
@@ -936,6 +939,13 @@ sub check_for_errors : Private {
$c->stash->{field_errors} ||= {};
my %field_errors = $c->cobrand->report_check_for_errors( $c );
+ # Zurich, we don't care about title or name
+ # There is no title, and name is optional
+ if ( $c->cobrand->moniker eq 'zurich' ) {
+ delete $field_errors{title};
+ delete $field_errors{name};
+ }
+
# FIXME: need to check for required bromley fields here
# if they're got the login details wrong when signing in then