support textarea for config options

This commit is contained in:
Roland Gruber 2008-01-16 19:56:31 +00:00
parent b70b319b62
commit 903044dc98
2 changed files with 6 additions and 1 deletions

View File

@ -606,12 +606,13 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
echo ' rows="' . $input[$i][$j]['rows'] . '"';
echo ">";
if (isset($values[$input[$i][$j]['name']])) {
echo htmlspecialchars($values[$input[$i][$j]['name']], ENT_QUOTES, "UTF-8");
echo htmlspecialchars(implode("\r\n", $values[$input[$i][$j]['name']]), ENT_QUOTES, "UTF-8");
}
else {
echo htmlspecialchars($input[$i][$j]['value'], ENT_QUOTES, "UTF-8");
}
echo "</textarea>";
$ret[$input[$i][$j]['name']] = 'textarea'; // save type
break;
// inner fieldset
case 'fieldset':

View File

@ -572,6 +572,10 @@ function saveSettings() {
elseif ($_SESSION['conf_types'][$element] == "multiselect") {
$options[$element] = $_POST[$element]; // value is already an array
}
// textarea
elseif ($_SESSION['conf_types'][$element] == "textarea") {
$options[$element] = explode("\r\n", $_POST[$element]);
}
}
// get list of scopes of modules