";
$savemsg .= "";
foreach ($groups as $group) {
$savemsg .= "- " . "{$group} " . "
";
}
$savemsg .= "
";
} else {
$input_errors[] = gettext("Authentication failed.");
}
}
} else {
if (isset($config['system']['webgui']['authmode'])) {
$pconfig['authmode'] = $config['system']['webgui']['authmode'];
} else {
$pconfig['authmode'] = "Local Database";
}
}
$pgtitle = array(gettext("Diagnostics"), gettext("Authentication"));
$shortcut_section = "authentication";
include("head.inc");
if ($input_errors) {
print_input_errors($input_errors);
}
if ($savemsg) {
print_info_box($savemsg, 'success', false);
}
$form = new Form(false);
$section = new Form_Section('Authentication Test');
foreach (auth_get_authserver_list() as $auth_server) {
$serverlist[$auth_server['name']] = $auth_server['name'];
}
$section->addInput(new Form_Select(
'authmode',
'*Authentication Server',
$pconfig['authmode'],
$serverlist
))->setHelp('Select the authentication server to test against.');
$section->addInput(new Form_Input(
'username',
'*Username',
'text',
$pconfig['username'],
['placeholder' => 'Username']
));
$section->addInput(new Form_Input(
'password',
'*Password',
'password',
$pconfig['password'],
['placeholder' => 'Password']
));
$form->add($section);
$form->addGlobal(new Form_Button(
'Submit',
'Test',
null,
'fa-wrench'
))->addClass('btn-primary');
print $form;
include("foot.inc");