From 8543e7559437be8309ea171802447a3764017285 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 21 Oct 2020 12:51:27 +1300 Subject: [PATCH] NEW Add link to continue to admin --- src/Security/MemberAuthenticator/MemberLoginForm.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Security/MemberAuthenticator/MemberLoginForm.php b/src/Security/MemberAuthenticator/MemberLoginForm.php index 8465689ebae..2701a06de43 100644 --- a/src/Security/MemberAuthenticator/MemberLoginForm.php +++ b/src/Security/MemberAuthenticator/MemberLoginForm.php @@ -2,6 +2,7 @@ namespace SilverStripe\Security\MemberAuthenticator; +use SilverStripe\Admin\AdminRootController; use SilverStripe\Control\Director; use SilverStripe\Control\RequestHandler; use SilverStripe\Forms\CheckboxField; @@ -87,7 +88,13 @@ public function __construct( if ($checkCurrentUser && Security::getCurrentUser()) { // @todo find a more elegant way to handle this $logoutAction = Security::logout_url(); + $adminPath = Director::absoluteURL(AdminRootController::config()->get('url_base'), true); + $adminText = _t( + 'SilverStripe\\Security\\Member.TODO_ADD_TO_YML', + 'Continue to admin area' + ); $fields = FieldList::create( + LiteralField::create('AdminLink', '' . $adminText . ''), HiddenField::create('AuthenticationMethod', null, $this->getAuthenticatorClass(), $this) ); $actions = FieldList::create(