fix problems with browser autocomplete

This commit is contained in:
Roland Gruber 2013-07-21 10:35:54 +00:00
parent 7318c7364d
commit b41487794d
2 changed files with 8 additions and 5 deletions

View File

@ -186,7 +186,7 @@ if (sizeof($errorsToDisplay) > 0) {
} }
// display formular // display formular
echo ("<form action=\"confmain.php\" method=\"post\">\n"); echo ("<form action=\"confmain.php\" method=\"post\" autocomplete=\"off\">\n");
// hidden submit buttons which are clicked by tabs // hidden submit buttons which are clicked by tabs
echo "<div style=\"display: none;\">\n"; echo "<div style=\"display: none;\">\n";
@ -516,10 +516,13 @@ function checkInput() {
$conf->setLoginMethod($_POST['loginMethod']); $conf->setLoginMethod($_POST['loginMethod']);
$conf->setLoginSearchFilter($_POST['loginSearchFilter']); $conf->setLoginSearchFilter($_POST['loginSearchFilter']);
$conf->setLoginSearchSuffix($_POST['loginSearchSuffix']); $conf->setLoginSearchSuffix($_POST['loginSearchSuffix']);
if (!$conf->setLoginSearchDN($_POST['loginSearchDN'])) {
$errors[] = array("ERROR", _("Please enter a valid bind user."));
}
$conf->setLoginSearchPassword($_POST['loginSearchPassword']); $conf->setLoginSearchPassword($_POST['loginSearchPassword']);
$conf->setLoginSearchDN($_POST['loginSearchDN']);
if ($_POST['loginMethod'] == LAMConfig::LOGIN_SEARCH) { // check only if search method
if (!$conf->setLoginSearchDN($_POST['loginSearchDN'])) {
$errors[] = array("ERROR", _("Please enter a valid bind user."));
}
}
if (isset($_POST['httpAuthentication']) && ($_POST['httpAuthentication'] == 'on')) { if (isset($_POST['httpAuthentication']) && ($_POST['httpAuthentication'] == 'on')) {
$conf->setHttpAuthentication('true'); $conf->setHttpAuthentication('true');
} }

View File

@ -144,7 +144,7 @@ foreach ($jsFiles as $jsEntry) {
// print error messages // print error messages
for ($i = 0; $i < sizeof($errorsToDisplay); $i++) call_user_func_array('StatusMessage', $errorsToDisplay[$i]); for ($i = 0; $i < sizeof($errorsToDisplay); $i++) call_user_func_array('StatusMessage', $errorsToDisplay[$i]);
echo ("<form action=\"moduleSettings.php\" method=\"post\">\n"); echo ("<form action=\"moduleSettings.php\" method=\"post\" autocomplete=\"off\">\n");
// hidden submit buttons which are clicked by tabs // hidden submit buttons which are clicked by tabs
echo "<div style=\"display: none;\">\n"; echo "<div style=\"display: none;\">\n";