Fixed selected attribute issue in option generation method.

This commit is contained in:
Josh Sherman 2011-01-31 00:01:50 -05:00
parent 98c5e97eac
commit a7addc1ab0

View file

@ -9,7 +9,7 @@
* Redistribution of these files must retain the above copyright notice.
*
* @author Josh Sherman <josh@gravityblvd.com>
* @copyright Copyright 2007-2010, Gravity Boulevard, LLC
* @copyright Copyright 2007-2011, Gravity Boulevard, LLC
* @license http://www.opensource.org/licenses/mit-license.html
* @package PICKLES
* @link http://p.ickl.es
@ -169,7 +169,7 @@ class Form extends Object
}
}
$options_html .= '<option label="' . addslashes($sub_label) . '" value="' . $sub_key . '"' . $selected . '>' . $sub_label . '</option>';
$options_html .= '<option label="' . addslashes($sub_label) . '" value="' . $sub_key . '"' . $selected_attribute . '>' . $sub_label . '</option>';
}
$options_html .= '</optgroup>';
@ -186,7 +186,7 @@ class Form extends Object
}
}
$options_html .= '<option label="' . addslashes($main_label) . '" value="' . $main_key . '"' . $selected . '>' . $main_label . '</option>';
$options_html .= '<option label="' . addslashes($main_label) . '" value="' . $main_key . '"' . $selected_attribute . '>' . $main_label . '</option>';
}
}
}