Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW Add link to continue to admin #9739

Draft
wants to merge 1 commit into
base: 4
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Security/MemberAuthenticator/MemberLoginForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\Security\MemberAuthenticator;

use SilverStripe\Admin\AdminRootController;
use SilverStripe\Control\Director;
use SilverStripe\Control\RequestHandler;
use SilverStripe\Forms\CheckboxField;
Expand Down Expand Up @@ -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', '<a href="' . $adminPath . '">' . $adminText . '</a>'),
HiddenField::create('AuthenticationMethod', null, $this->getAuthenticatorClass(), $this)
);
$actions = FieldList::create(
Expand Down