Former-commit-id: 7920fc0927ddab510b2a9869a09fd7e0cf166182
This commit is contained in:
marcos.alconada 2019-03-07 12:34:09 +01:00
parent 4eb6c16339
commit f26593dc21
1 changed files with 2 additions and 4 deletions

View File

@ -518,7 +518,7 @@ function html_print_select(
$selected='', $selected='',
$script='', $script='',
$nothing='', $nothing='',
$nothing_value=0, $nothing_value=none,
$return=false, $return=false,
$multiple=false, $multiple=false,
$sort=true, $sort=true,
@ -623,8 +623,6 @@ function html_print_select(
$output .= 'selected '; $output .= 'selected ';
} }
$output .= 'value="'.$value.'"';
if (is_array($selected) && in_array($value, $selected)) { if (is_array($selected) && in_array($value, $selected)) {
$output .= ' selected="selected"'; $output .= ' selected="selected"';
} else if (is_numeric($value) && is_numeric($selected) } else if (is_numeric($value) && is_numeric($selected)
@ -644,7 +642,7 @@ function html_print_select(
} }
if ($optlabel === '') { if ($optlabel === '') {
$output .= '>'.$value.'</option>'; $output .= '>None</option>';
} else { } else {
$output .= '>'.$optlabel.'</option>'; $output .= '>'.$optlabel.'</option>';
} }