diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 844c87f7a..a923f1f97 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -61,8 +61,12 @@ private function getRedirectBackUrl(): string { if (!Str::contains($referrer, '?open')) { $goBackUrl .= '?open=1'; } //so user can go back and open the questionnaire + } else { + $goBackUrl = $referrer; } } + } else { + $goBackUrl = route('home'); } return $goBackUrl; diff --git a/resources/views/code-of-conduct/en.blade.php b/resources/views/code-of-conduct/en.blade.php index 45c7ce4d1..d32341d09 100644 --- a/resources/views/code-of-conduct/en.blade.php +++ b/resources/views/code-of-conduct/en.blade.php @@ -111,7 +111,7 @@ @if ($goBackUrl)
Back to the questionnaire + class="fas fa-long-arrow-alt-left"> Go Back
@endif