move openid instructions to OpenIDPlugin

This commit is contained in:
Evan Prodromou 2009-08-04 13:27:22 -04:00
parent 622c0b24c3
commit 5dc1291b59
3 changed files with 27 additions and 6 deletions

View File

@ -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.');
}
}

View File

@ -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);

View File

@ -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;
}
}