From b41487794d4e8d5e311e7ad07807d4103713f8ea Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 21 Jul 2013 10:35:54 +0000 Subject: [PATCH] fix problems with browser autocomplete --- lam/templates/config/confmain.php | 11 +++++++---- lam/templates/config/moduleSettings.php | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index 8cea8c09..24834590 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -186,7 +186,7 @@ if (sizeof($errorsToDisplay) > 0) { } // display formular -echo ("
\n"); +echo ("\n"); // hidden submit buttons which are clicked by tabs echo "
\n"; @@ -516,10 +516,13 @@ function checkInput() { $conf->setLoginMethod($_POST['loginMethod']); $conf->setLoginSearchFilter($_POST['loginSearchFilter']); $conf->setLoginSearchSuffix($_POST['loginSearchSuffix']); - if (!$conf->setLoginSearchDN($_POST['loginSearchDN'])) { - $errors[] = array("ERROR", _("Please enter a valid bind user.")); - } $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')) { $conf->setHttpAuthentication('true'); } diff --git a/lam/templates/config/moduleSettings.php b/lam/templates/config/moduleSettings.php index caaebdb9..47fbc7eb 100644 --- a/lam/templates/config/moduleSettings.php +++ b/lam/templates/config/moduleSettings.php @@ -144,7 +144,7 @@ foreach ($jsFiles as $jsEntry) { // print error messages for ($i = 0; $i < sizeof($errorsToDisplay); $i++) call_user_func_array('StatusMessage', $errorsToDisplay[$i]); -echo ("\n"); +echo ("\n"); // hidden submit buttons which are clicked by tabs echo "
\n";