diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-07-31 13:27:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-07-31 13:27:56 +0100 |
commit | 0d65707e831bacc272db6dd2ce539de57e412033 (patch) | |
tree | e86986b7eb4a1ade3eda806f840cd3711d44d02f /perllib/FixMyStreet/App/Controller/Admin.pm | |
parent | b748677e472552c45c2fdc32c7ae9462cd2c0ce8 (diff) | |
parent | 749df1cfe907190632b09e434f9411cf08b5b2cf (diff) |
Merge branch 'admin-external-url'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 114a2e19f..6145a6eb0 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -425,7 +425,7 @@ sub update_contacts : Private { sub body_params : Private { my ( $self, $c ) = @_; - my @fields = qw/name endpoint jurisdiction api_key send_method send_comments suppress_alerts send_extended_statuses comment_user_id can_be_devolved parent deleted/; + my @fields = qw/name endpoint jurisdiction api_key send_method external_url/; my %defaults = map { $_ => '' } @fields; %defaults = ( %defaults, send_comments => 0, @@ -436,7 +436,7 @@ sub body_params : Private { parent => undef, deleted => 0, ); - my %params = map { $_ => $c->get_param($_) || $defaults{$_} } @fields; + my %params = map { $_ => $c->get_param($_) || $defaults{$_} } keys %defaults; return \%params; } @@ -705,6 +705,13 @@ sub report_edit : Path('report_edit') : Args(1) { $c->forward( 'log_edit', [ $id, 'problem', 'resend' ] ); } + elsif ( $c->get_param('mark_sent') ) { + $c->forward('check_token'); + $problem->whensent(\'ms_current_timestamp()'); + $problem->update(); + $c->stash->{status_message} = '<p><em>' . _('That problem has been marked as sent.') . '</em></p>'; + $c->forward( 'log_edit', [ $id, 'problem', 'marked sent' ] ); + } elsif ( $c->get_param('flaguser') ) { $c->forward('flag_user'); $c->stash->{problem}->discard_changes; |