From 62bb471ba0bf8d996e4548b835cd23fa3da92696 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 28 Nov 2010 20:58:23 -0800 Subject: localise login template, allow openid to be disabled --- boot.php | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 3c319d7b7..a818f5a86 100644 --- a/boot.php +++ b/boot.php @@ -545,15 +545,40 @@ function login($register = false) { $o = ""; $register_html = (($register) ? load_view_file("view/register-link.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 { + $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')) { - $o = load_view_file("view/logout.tpl"); + $tpl = load_view_file("view/logout.tpl"); } else { - $o = load_view_file("view/login.tpl"); + $tpl = load_view_file("view/login.tpl"); - $o = replace_macros($o,array('$register_html' => $register_html )); } + + $o = replace_macros($tpl,array( + '$register_html' => $register_html, + '$classname' => $classname, + '$namelabel' => $namelabel, + '$passlabel' => $passlabel, + '$login' => $login, + '$lostpass' => $lostpass, + '$lostlink' => $lostlink + )); + return $o; }} -- cgit v1.2.3