forked from science-ation/science-ation
- Allow multiselect to select nothing
This commit is contained in:
parent
57f62f7ab4
commit
9eca885410
@ -51,7 +51,9 @@ function config_editor_parse_from_http_headers($array_name)
|
||||
if(is_array($_POST[$array_name][$id])) {
|
||||
$ans[$id] = array();
|
||||
foreach($_POST[$array_name][$id] as $k=>$v) {
|
||||
$ans[$id][$k]=stripslashes($v);
|
||||
if($v != '') {
|
||||
$ans[$id][$k]=stripslashes($v);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ans[$id] = stripslashes($_POST[$array_name][$id]);
|
||||
@ -216,6 +218,7 @@ function config_editor($category, $year, $array_name, $self)
|
||||
if($sz > 5) $sz=5;
|
||||
$multiple = "$multiple size=\"$sz\"";
|
||||
$name="{$name}[]";
|
||||
print("<input type=\"hidden\" name=\"$name\" value=\"\" >\n");
|
||||
}
|
||||
print("<select $multiple name=\"$name\">");
|
||||
for($x=0; $x<count($regs[1]); $x++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user