cleaning up form class.
This commit is contained in:
parent
c3ea6e656d
commit
c3f418b13c
|
@ -464,13 +464,12 @@ public static function select($name, $options = array(), $selected = null, $attr
|
||||||
|
|
||||||
$html_options = array();
|
$html_options = array();
|
||||||
|
|
||||||
|
// -------------------------------------------------------
|
||||||
|
// Build the HTML options for the drop-down.
|
||||||
|
// -------------------------------------------------------
|
||||||
foreach ($options as $value => $display)
|
foreach ($options as $value => $display)
|
||||||
{
|
{
|
||||||
$option_attributes = array();
|
$option_attributes = array('value' => HTML::entities($value), 'selected' => ($value == $selected) ? 'selected' : null);
|
||||||
|
|
||||||
$option_attributes['value'] = HTML::entities($value);
|
|
||||||
$option_attributes['selected'] = ($value == $selected) ? 'selected' : null;
|
|
||||||
|
|
||||||
$html_options[] = '<option'.HTML::attributes($option_attributes).'>'.HTML::entities($display).'</option>';
|
$html_options[] = '<option'.HTML::attributes($option_attributes).'>'.HTML::entities($display).'</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue