GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 5dc1291b authored by Evan Prodromou's avatar Evan Prodromou

move openid instructions to OpenIDPlugin

parent 622c0b24
......@@ -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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment