function yesno($name, $value = '')
{
// 1||0//Y||N//y||n//YES||NO - autodetect
$html = "";
switch ($value) {
case '0':
case '1':
$values = array(1, 0);
break;
case 'Y':
case 'N':
$values = array('Y', 'N');
case 'y':
case 'n':
$values = array('y', 'n');
case 'YES':
case 'NO':
$values = array('YES', 'NO');
default:
$values = array('YES', 'NO');
}
$html .= form::radio($name, $values[0], Lang::item('common.yes'), $value);
$html .= form::radio($name, $values[1], Lang::item('common.no'), $value);
return $html;
}