From a9aa9fdbb29e632d24d8db2ddcfc56fc309f0862 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 25 Jul 2015 15:12:07 +0200 Subject: [PATCH] Minor fix --- vroom.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/vroom.pl b/vroom.pl index a9c41f3..d24c1fd 100755 --- a/vroom.pl +++ b/vroom.pl @@ -1554,11 +1554,20 @@ any [ qw(GET POST) ] => '/invitation/:token' => { token => '' } => sub { elsif ($self->req->method eq 'POST'){ my $response = $self->param('response') || 'decline'; my $message = $self->param('message') || ''; - if ($response !~ m/^(later|decline)$/ || !$self->respond_to_invitation($token,$response,$message)){ - return $self->render('error'); + if ($response !~ m/^(later|decline)$/ || !$self->respond_to_invitation($token, $response, $message)){ + return $self->render('error', + err => 'ERROR_INVITATION_INVALID', + msg => $self->l('ERROR_INVITATION_INVALID'), + room => $room + ); } return $self->render('invitation_thanks'); } + return $self->render('error', + err => 'ERROR_OCCURRED', + msg => $self->l('ERROR_OCCURRED'), + room => $room + ); }; # Create a json script which contains localization