diff --git a/frontend/locales/english.lng b/frontend/locales/english.lng index fc922a6..93980b8 100644 --- a/frontend/locales/english.lng +++ b/frontend/locales/english.lng @@ -27,8 +27,9 @@ event-years-ago; %1$d years ago ## Miscellaneous footer; CVM is a free and open source VPS control panel. Want to contribute? +title-unauthorized; Unauthorized error-unauthorized-title; You are not authorized to view this page -error-unauthorized-text; Your access level is not sufficient. +error-unauthorized-text; Your access level is not sufficient or you are not logged in. error-notfound-title; VPS not found error-notfound-text; The VPS you selected was not found. diff --git a/frontend/rewrite.php b/frontend/rewrite.php index afa4b60..fbe6225 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -234,9 +234,12 @@ try } catch (UnauthorizedException $e) { - /* TODO: Create a proper template for this. */ - $sPageTitle = "Unauthorized"; - $sMainContents = "You are not authorized to view this page."; + $sPageTitle = $locale->strings['title-unauthorized']; + + $sMainContents = NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( + 'title' => $locale->strings['error-unauthorized-title'], + 'message' => $locale->strings['error-unauthorized-text'] + )); } $sTemplateParameters = array_merge($sTemplateParameters, array(