diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-05-21 16:26:23 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-05-21 16:26:23 +0100 |
commit | 7985b5e44688f9ddaf430bf06c42b50484da038a (patch) | |
tree | 90b0f0cbd28d1fbb2d5fe0c7ade91b60531983b2 | |
parent | df4cc931c4e0320335508bc611ff77c2394181e5 (diff) |
Only Bromley cobrand has first/last name fields, all have title.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bromley.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm index 38c115e1a..bc2903b70 100644 --- a/perllib/FixMyStreet/Cobrand/Bromley.pm +++ b/perllib/FixMyStreet/Cobrand/Bromley.pm @@ -56,5 +56,10 @@ sub ask_ever_reported { return 0; } +sub process_extras { + my $self = shift; + $self->SUPER::process_extras( @_, [ 'first_name', 'last_name' ] ); +} + 1; diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index bd7c708a8..32ac0ef8d 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -52,9 +52,11 @@ sub process_extras { my $ctx = shift; my $contacts = shift; my $extra = shift; + my $fields = shift || []; if ( $contacts->[0]->area_id == 2482 ) { - for my $field ( qw/ fms_extra_title first_name last_name / ) { + my @fields = ( 'fms_extra_title', @$fields ); + for my $field ( @fields ) { my $value = $ctx->request->param( $field ); if ( !$value ) { |