option
*
*/
$class = $vars['class'];
if (!$class) {
$class = "elgg-input-radio";
}
if (!isset($vars['value']) || $vars['value'] === FALSE) {
$vars['value'] = elgg_get_sticky_value($vars['internalname']);
}
foreach($vars['options'] as $label => $option) {
if (strtolower($option) != strtolower($vars['value'])) {
$selected = "";
} else {
$selected = "checked = \"checked\"";
}
// handle indexed array where label is not specified
// @todo deprecate in Elgg 1.8
if (is_integer($label)) {
$label = $option;
}
if (isset($vars['internalid'])) {
$id = "id=\"{$vars['internalid']}\"";
}
if ($vars['disabled']) {
$disabled = ' disabled="yes" ';
}
echo "
";
}