1
1
Fork 0

localise login template, allow openid to be disabled

This commit is contained in:
Friendika 2010-11-28 20:58:23 -08:00
commit 62bb471ba0
9 changed files with 81 additions and 19 deletions

View file

@ -545,15 +545,40 @@ function login($register = false) {
$o = "";
$register_html = (($register) ? load_view_file("view/register-link.tpl") : "");
if(x($_SESSION,'authenticated')) {
$o = load_view_file("view/logout.tpl");
$noid = get_config('system','no_openid');
if($noid) {
$classname = 'no-openid';
$namelabel = t('Nickname or Email address: ');
$passlabel = t('Password: ');
$login = t('Login');
}
else {
$o = load_view_file("view/login.tpl");
$o = replace_macros($o,array('$register_html' => $register_html ));
$classname = 'openid';
$namelabel = t('Nickname/Email/OpenID: ');
$passlabel = t("Password \x28if not OpenID\x29: ");
$login = t('Login');
}
$lostpass = t('Forgot your password?');
$lostlink = t('Password Reset');
if(x($_SESSION,'authenticated')) {
$tpl = load_view_file("view/logout.tpl");
}
else {
$tpl = load_view_file("view/login.tpl");
}
$o = replace_macros($tpl,array(
'$register_html' => $register_html,
'$classname' => $classname,
'$namelabel' => $namelabel,
'$passlabel' => $passlabel,
'$login' => $login,
'$lostpass' => $lostpass,
'$lostlink' => $lostlink
));
return $o;
}}