$this->elementEnd('li');
$this->elementEnd('ul');
+ // quickie hack
+ $button = false;
if (!common_logged_in()) {
- if (Event::handle('StartOAuthLoginForm', array($this))) {
+ if (Event::handle('StartOAuthLoginForm', array($this, &$button))) {
$this->elementStart('fieldset');
// TRANS: Fieldset legend.
$this->element('legend', null, _m('LEGEND','Account'));
$this->elementEnd('fieldset');
}
- Event::handle('EndOAuthLoginForm', array($this));
+ Event::handle('EndOAuthLoginForm', array($this, &$button));
}
$this->element('input', array('id' => 'cancel_submit',
'name' => 'allow',
'type' => 'submit',
// TRANS: Button text that when clicked will allow access to an account by an external application.
- 'value' => _m('BUTTON','Allow')));
+ 'value' => $button ? $button : _m('BUTTON','Allow')));
$this->elementEnd('fieldset');
$this->elementEnd('form');
return true;
}
- function onStartOAuthLoginForm($action)
+ function onStartOAuthLoginForm($action, &$button)
{
if (common_config('site', 'openidonly')) {
// Cancel the regular password login form, we won't need it.
$this->showOAuthLoginForm($action);
+ // TRANS: button label for OAuth authorization page when needing OpenID authentication first.
+ $button = _m('BUTTON', 'Continue');
return false;
} else {
// Leave the regular password login form in place.
*/
protected function showOAuthLoginForm($action)
{
+ $action->elementStart('fieldset');
+ // TRANS: OpenID plugin logon form legend.
+ $action->element('legend', null, _m('OpenID login'));
+
$action->elementStart('ul', 'form_data');
$action->elementStart('li');
$provider = common_config('openid', 'trusted_provider');
}
$action->elementEnd('li');
$action->elementEnd('ul');
+
+ $action->elementEnd('fieldset');
}
/**