use textarea for admin list

This commit is contained in:
Roland Gruber 2007-01-04 20:05:12 +00:00
parent b7101c977b
commit 28329f0dc5
2 changed files with 11 additions and 3 deletions

View File

@ -85,7 +85,7 @@ $helpArray = array (
_("Example") . ": </b></big>#homeDirectory;#uid;#uidNumber;#gidNumber;mail:Mail address<br><br>" .
"<br><big><b>" . _("Predefined values") . ":</b></big><br><br><br>" . $entry206Example),
"207" => array ("ext" => "FALSE", "Headline" => _("Configuration wizard") . " - " . _("Valid users"),
"Text" => _("This is a list of valid DN entries of all users that are allowed to login to LDAP Account Manager. The user names have to be separated by semicolons.") .
"Text" => _("This is a list of valid DN entries of all users that are allowed to login to LDAP Account Manager. Please enter one DN per line.") .
"<br><br><b>" .
_("Example") .
": </b>cn=admin,dc=yourdomain,dc=org;cn=manager,dc=yourdomain,dc=org"),

View File

@ -344,9 +344,10 @@ echo ("<p></p>\n");
echo ("<fieldset><legend><b>" . _("Security settings") . "</b></legend>\n");
echo ("<table border=0>\n");
// admin list
$adminText = implode("\n", explode(";", $conf->get_Adminstring()));
echo ("<tr><td align=\"right\"><b>".
_("List of valid users") . " *: </b></td>".
"<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"admins\" value=\"" . $conf->get_Adminstring() . "\"></td>\n");
"<td><textarea tabindex=\"$tabindex\" size=50 type=\"text\" name=\"admins\" cols=75 rows=5>" . $adminText . "</textarea></td>\n");
echo "<td>";
echo "<a href=\"../help.php?HelpNumber=207\" target=\"lamhelp\">";
echo "<img src=\"../../graphics/help.png\" alt=\"" . _('Help') . "\" title=\"" . _('Help') . "\">";
@ -427,7 +428,14 @@ function saveSettings() {
if (!$conf->set_cacheTimeout($_POST['cachetimeout'])) {
$errors[] = array("ERROR", _("Cache timeout is invalid!"));
}
if (!$conf->set_Adminstring($_POST['admins'])) {
$adminText = $_POST['admins'];
$adminText = explode("\n", $adminText);
$adminTextNew = array();
for ($i = 0; $i < sizeof($adminText); $i++) {
if (trim($adminText[$i]) == "") continue;
$adminTextNew[] = trim($adminText[$i]);
}
if (!$conf->set_Adminstring(implode(";", $adminTextNew))) {
$errors[] = array("ERROR", _("List of admin users is empty or invalid!"));
}
if (!$conf->set_Suffix("tree", $_POST['sufftree'])) {