forked from GNUsocial/gnu-social
move openid instructions to OpenIDPlugin
This commit is contained in:
parent
622c0b24c3
commit
5dc1291b59
@ -250,8 +250,7 @@ class LoginAction extends Action
|
||||
} else {
|
||||
return _('Login with your username and password. ' .
|
||||
'Don\'t have a username yet? ' .
|
||||
'[Register](%%action.register%%) a new account, or ' .
|
||||
'try [OpenID](%%action.openidlogin%%). ');
|
||||
'[Register](%%action.register%%) a new account.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -329,10 +329,7 @@ class RegisterAction extends Action
|
||||
common_markup_to_html(_('With this form you can create '.
|
||||
' a new account. ' .
|
||||
'You can then post notices and '.
|
||||
'link up to friends and colleagues. '.
|
||||
'(Have an [OpenID](http://openid.net/)? ' .
|
||||
'Try our [OpenID registration]'.
|
||||
'(%%action.openidlogin%%)!)'));
|
||||
'link up to friends and colleagues. '));
|
||||
|
||||
$this->elementStart('div', 'instructions');
|
||||
$this->raw($instr);
|
||||
|
@ -171,4 +171,29 @@ class OpenIDPlugin extends Plugin
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function onEndShowPageNotice($action)
|
||||
{
|
||||
$name = $action->trimmed('action');
|
||||
|
||||
switch ($name)
|
||||
{
|
||||
case 'register':
|
||||
$instr = '(Have an [OpenID](http://openid.net/)? ' .
|
||||
'Try our [OpenID registration]'.
|
||||
'(%%action.openidlogin%%)!)';
|
||||
break;
|
||||
case 'login':
|
||||
$instr = '(Have an [OpenID](http://openid.net/)? ' .
|
||||
'Try our [OpenID login]'.
|
||||
'(%%action.openidlogin%%)!)';
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
$output = common_markup_to_html($instr);
|
||||
$action->raw($output);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user