diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Oxfordshire.pm | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 60f7ac903..ba9fa11b9 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -326,6 +326,8 @@ sub inspect : Private { $c->stash->{has_default_priority} = scalar( grep { $_->is_default } $problem->response_priorities ); } + $c->stash->{max_detailed_info_length} = $c->cobrand->max_detailed_info_length; + if ( $c->get_param('save') ) { $c->forward('/auth/check_csrf_token'); @@ -339,7 +341,9 @@ sub inspect : Private { if ( my $info = $c->get_param('detailed_information') ) { $problem->set_extra_metadata( detailed_information => $info ); - if (length($info) > 172) { + if ($c->cobrand->max_detailed_info_length && + length($info) > $c->cobrand->max_detailed_info_length + ) { $valid = 0; push @{ $c->stash->{errors} }, sprintf( diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 002d8e3da..1258c8bca 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -1090,6 +1090,8 @@ sub state_groups_inspect { ] } +sub max_detailed_info_length { 0 } + =head2 never_confirm_updates If true then we never send an email to confirm an update diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm index 44747a16f..cdd186fef 100644 --- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm +++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm @@ -217,6 +217,8 @@ sub user_extra_fields { sub display_days_ago_threshold { 28 } +sub max_detailed_info_length { 172 } + sub defect_type_extra_fields { return [ 'activity_code', |