function i_select_radio($name, $choices, $value = '', $opts = array()) { // FIXME: not sure what the itag/ltag markup should be here $out = array(); foreach ($choices as $k => $v) { // each radio button goes inside an itag $out[] = radio($name, $k, $k == $value, "{$name}_{$k}") . sp . '<label for="' . $name . '_' . $k . '">' . $v . '</label>'; } return tag(tag($this->label($name, $opts) . ' ' . pophelp($name), $this->ltag) . tag(fieldset(join(br . n, $out), '', $name), $this->itag), $this->rowtag); }
function i_awol($name, $value = '', $opts = array()) { // the "something's wrong with your prefs table" fallback widget return tag(tag($this->label($name, $opts) . ' ' . pophelp($name), $this->ltag) . tag(gTxt('no_widget_for_pref', array('pref' => $name)), $this->itag), $this->rowtag); }