diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-17 16:53:59 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-17 16:53:59 +0200 |
commit | de44072172b7f56345041358a0be275b482e474c (patch) | |
tree | 1298dbe93bae97687932e9ffe346350f42572ade /boot.php | |
parent | 2116943964e0c10984976f6d38eba044e35f983a (diff) | |
download | volse-hubzilla-de44072172b7f56345041358a0be275b482e474c.tar.gz volse-hubzilla-de44072172b7f56345041358a0be275b482e474c.tar.bz2 volse-hubzilla-de44072172b7f56345041358a0be275b482e474c.zip |
works on login form
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 50 |
1 files changed, 21 insertions, 29 deletions
@@ -636,29 +636,16 @@ function get_guid($size=16) { if(! function_exists('login')) { function login($register = false) { $o = ""; - $register_tpl = (($register) ? get_markup_template("register-link.tpl") : ""); - - $register_html = replace_macros($register_tpl,array( - '$title' => t('Create a New Account'), - '$desc' => t('Register') - )); - - $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'); + $reg = false; + if ($register) { + $reg = array( + 'title' => t('Create a New Account'), + 'desc' => t('Register') + ); } - $lostpass = t('Forgot your password?'); - $lostlink = t('Password Reset'); + $noid = get_config('system','no_openid'); + if(local_user()) { $tpl = get_markup_template("logout.tpl"); } @@ -667,17 +654,22 @@ function login($register = false) { } - $o = '<script type="text/javascript"> $(document).ready(function() { $("#login-name").focus();} );</script>'; $o .= replace_macros($tpl,array( '$logout' => t('Logout'), - '$register_html' => $register_html, - '$classname' => $classname, - '$namelabel' => $namelabel, - '$passlabel' => $passlabel, - '$login' => $login, - '$lostpass' => $lostpass, - '$lostlink' => $lostlink + '$login' => t('Login'), + + '$lname' => array('username', t('Nickname or Email address: ') , '', ''), + '$lpassword' => array('password', t('Password: '), '', ''), + + '$openid' => !$noid, + '$lopenid' => array('openid_url', t('OpenID: '),'',''), + + + '$register' => $reg, + + '$lostpass' => t('Forgot your password?'), + '$lostlink' => t('Password Reset'), )); call_hooks('login_hook',$o); |