X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Flogin.php;h=93661973287bc5ef74e8f7d8240a3de1e55afb3f;hb=91af9de7e4e477da422880fe9b7f3a49617dc77e;hp=83fa3ed23c262f9f7a09f7a5166ad1c6c1bfb8f0;hpb=90583f31af6392005b11915e2e0f2a6755ab0ea7;p=quix0rs-gnu-social.git diff --git a/actions/login.php b/actions/login.php index 83fa3ed23c..9366197328 100644 --- a/actions/login.php +++ b/actions/login.php @@ -45,6 +45,7 @@ class LoginAction extends Action { } common_real_login(true); if ($this->boolean('rememberme')) { + common_debug('Adding rememberme cookie for ' . $nickname); common_rememberme(); } # success! @@ -65,12 +66,12 @@ class LoginAction extends Action { function show_form($error=NULL) { common_show_header(_t('Login'), NULL, $error, array($this, 'show_top')); - common_element_start('form', array('method' => 'POST', + common_element_start('form', array('method' => 'post', 'id' => 'login', 'action' => common_local_url('login'))); common_input('nickname', _t('Nickname')); common_password('password', _t('Password')); - common_checkbox('rememberme', _t('Remember me'), + common_checkbox('rememberme', _t('Remember me'), false, _t('Automatically login in the future; ' . 'not for shared computers!')); common_submit('submit', _t('Login')); @@ -82,13 +83,22 @@ class LoginAction extends Action { common_show_footer(); } + function get_instructions() { + return _t('Login with your username and password. ' . + 'Don\'t have a username yet? ' . + '[Register](%%action.register%%) a new account, or ' . + 'try [OpenID](%%action.openidlogin%%). '); + } + function show_top($error=NULL) { if ($error) { common_element('p', 'error', $error); } else { - common_element('p', 'instructions', - _t('Login with your username and password. ' . - 'Don\'t have a username yet? Choose register above. ')); + $instr = $this->get_instructions(); + $output = common_markup_to_html($instr); + common_element_start('p', 'instructions'); + common_raw($output); + common_element_end('p'); } } }