added support for select multiple.
This commit is contained in:
parent
5bd0f27d1c
commit
8ab33cf8c8
|
@ -381,7 +381,14 @@ public static function select($name, $options = array(), $selected = null, $attr
|
||||||
*/
|
*/
|
||||||
protected static function option($value, $display, $selected)
|
protected static function option($value, $display, $selected)
|
||||||
{
|
{
|
||||||
$selected = ($value == $selected) ? 'selected' : null;
|
if (is_array($selected))
|
||||||
|
{
|
||||||
|
$selected = (in_array($value, $selected)) ? 'selected' : null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$selected = ($value == $selected) ? 'selected' : null;
|
||||||
|
}
|
||||||
|
|
||||||
$attributes = array('value' => HTML::entities($value), 'selected' => $selected);
|
$attributes = array('value' => HTML::entities($value), 'selected' => $selected);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue