'form-stacked']); $params = [ 'placeholder' => get_lang('Username'), ]; // Avoid showing the autocapitalize option if the browser doesn't // support it: this attribute is against the HTML5 standard if (api_browser_support('autocapitalize')) { $params['autocapitalize'] = 'none'; } $form->addElement( 'text', 'login', null, $params ); $params = [ 'placeholder' => get_lang('Password'), ]; if (api_browser_support('autocapitalize')) { $params['autocapitalize'] = 'none'; } $form->addElement( 'password', 'password', null, $params ); $form->addButtonNext(get_lang('Login'), 'submitAuth'); // see same text in main_api.lib.php function api_not_allowed if (api_is_cas_activated()) { $msg .= Display::return_message(sprintf(get_lang('You already have an institutional account'), api_get_setting("Institution")), '', false); $msg .= Display::div("
".getCASLogoHTML()." ".sprintf(get_lang('Login with your account'), api_get_setting("Institution"))."

", ['align' => 'center']); $msg .= Display::return_message(get_lang('You don\'t have an institutional account')); $msg .= "

".get_lang('Login without an institutional account')."

"; $msg .= "
"; } $msg .= '
'; $msg .= $form->returnForm(); $msg .= '
'; if (api_is_cas_activated()) { $msg .= "
"; } $msg .= '

'.get_lang('Return to Course Homepage').'

'; $tpl->assign('content', '

'.get_lang('Please login to go to this course').'

'.$msg); $tpl->display_one_col_template(); } else { api_delete_firstpage_parameter(); header('Location: '.api_get_path(WEB_PATH).'index.php'); exit; }