showIcon = (bool)$showIcon; } /** * Display the Login Form Panel * * @author Andreas Gohr * * @return void */ public function show() { global $lang; global $conf; global $ID; global $INPUT; // print intro print p_locale_xhtml('login'); print '
'.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 \dokuwiki\Menu\Item\Register())->asHtmlLink('', $this->showIcon); $form->addHTML('

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

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

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

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