showIcon = (bool)$showIcon; } /** * Display the Login Form Panel * * @return void * @author Andreas Gohr * */ public function show() { global $lang; global $conf; global $ID; global $INPUT; // print intro echo p_locale_xhtml('login'); echo '
' . NL; // create the login form $form = new Form(['id' => 'dw__login', 'action' => wl($ID)]); $form->addTagOpen('div')->addClass('no'); $form->addFieldsetOpen($lang['btn_login']); $form->setHiddenField('id', $ID); $form->setHiddenField('do', 'login'); $input = $form->addTextInput('u', $lang['user'])->id('focus__this')->addClass('edit') ->val(($INPUT->bool('http_credentials')) ? '' : $INPUT->str('u')); $input->getLabel()->attr('class', 'block'); $form->addHTML("
\n"); $input = $form->addPasswordInput('p', $lang['pass'])->addClass('block edit'); $input->getLabel()->attr('class', 'block'); $form->addHTML("
\n"); if ($conf['rememberme']) { $form->addCheckbox('r', $lang['remember'])->id('remember__me')->val('1'); } $form->addButton('', $lang['btn_login'])->attr('type', 'submit'); $form->addFieldsetClose(); $form->addTagClose('div'); if (actionOK('register')) { $registerLink = (new Register())->asHtmlLink('', $this->showIcon); $form->addHTML('

' . $lang['reghere'] . ': ' . $registerLink . '

'); } if (actionOK('resendpwd')) { $resendPwLink = (new Resendpwd())->asHtmlLink('', $this->showIcon); $form->addHTML('

' . $lang['pwdforget'] . ': ' . $resendPwLink . '

'); } echo $form->toHTML('Login'); echo '
'; } }