mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Themed permissionFailure messages
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109102 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c488c6c93b
commit
ce79e78de6
@ -609,9 +609,8 @@ $lang['en_US']['SearchForm']['GO'] = 'Go';
|
|||||||
$lang['en_US']['SearchForm']['SEARCH'] = 'Search';
|
$lang['en_US']['SearchForm']['SEARCH'] = 'Search';
|
||||||
$lang['en_US']['SearchForm']['SearchResults'] = 'Search Results';
|
$lang['en_US']['SearchForm']['SearchResults'] = 'Search Results';
|
||||||
$lang['en_US']['Security']['ALREADYLOGGEDIN'] = array(
|
$lang['en_US']['Security']['ALREADYLOGGEDIN'] = array(
|
||||||
'You don\'t have access to this page. If you have another account that can access that page, you can <a href="%s">log in again</a>.',
|
'You don\'t have access to this page. If you have another account that can access that page, you can log in again below</a>.',
|
||||||
PR_MEDIUM,
|
PR_MEDIUM
|
||||||
'%s will be replaced with a link to log in.'
|
|
||||||
);
|
);
|
||||||
$lang['en_US']['Security']['BUTTONSEND'] = 'Send me the password reset link';
|
$lang['en_US']['Security']['BUTTONSEND'] = 'Send me the password reset link';
|
||||||
$lang['en_US']['Security']['CHANGEPASSWORDBELOW'] = 'You can change your password below.';
|
$lang['en_US']['Security']['CHANGEPASSWORDBELOW'] = 'You can change your password below.';
|
||||||
|
@ -173,7 +173,7 @@ class Security extends Controller {
|
|||||||
'alreadyLoggedIn' => _t(
|
'alreadyLoggedIn' => _t(
|
||||||
'Security.ALREADYLOGGEDIN',
|
'Security.ALREADYLOGGEDIN',
|
||||||
"You don't have access to this page. If you have another account that "
|
"You don't have access to this page. If you have another account that "
|
||||||
. "can access that page, you can <a href=\"%s\">log in again</a>.",
|
. "can access that page, you can log in again below.",
|
||||||
PR_MEDIUM,
|
PR_MEDIUM,
|
||||||
"%s will be replaced with a link to log in."
|
"%s will be replaced with a link to log in."
|
||||||
),
|
),
|
||||||
@ -202,12 +202,14 @@ class Security extends Controller {
|
|||||||
else
|
else
|
||||||
$message=$messageSet['default'];
|
$message=$messageSet['default'];
|
||||||
|
|
||||||
// Replace %s with the log in link
|
// Somewhat hackish way to render a login form with an error message.
|
||||||
$body = sprintf($message,
|
$me = new Security();
|
||||||
Controller::join_links(Director::baseURL(), 'Security/login',
|
$form = $me->LoginForm();
|
||||||
'?BackURL=' . urlencode($_SERVER['REQUEST_URI'])));
|
$form->sessionMessage($message, 'warning');
|
||||||
|
Session::set('MemberLoginForm.force_message',1);
|
||||||
|
$formText = $me->login();
|
||||||
|
|
||||||
$response->setBody($body);
|
$response->setBody($formText);
|
||||||
return $response;
|
return $response;
|
||||||
|
|
||||||
} else if(substr(Director::history(),0,15) == 'Security/logout') {
|
} else if(substr(Director::history(),0,15) == 'Security/logout') {
|
||||||
|
Loading…
Reference in New Issue
Block a user