18 require_once dirname(__FILE__).
'/../form_question_type_tickbox_list/form_question_type_tickbox_list_edit_fns.inc';
59 if (!$asset->writeAccess(
'attributes'))
return FALSE;
62 $none = Array(
'none');
63 $options = $asset->getOptions();
64 $options = array_merge($none, $options);
66 echo
"<table cellpadding=\"0\" cellspacing=\"0\">\n";
67 $defaults = $asset->attr(
'default');
69 if (!empty($options[1])) {
71 foreach ($options as $ref => $option) {
72 if (!trim($option))
continue;
74 $name = $prefix.
'default[]';
76 if ($option ==
'none') {
77 $checked = (empty($defaults)) ? TRUE : FALSE;
79 $checked = (in_array($ref - 1, $defaults)) ? TRUE : FALSE;
83 radio_button($name,
'none', $checked);
85 radio_button($name, ($ref - 1), $checked);
88 echo
' <span onclick="this.previousSibling.previousSibling.checked = (!this.previousSibling.previousSibling.checked || this.previousSibling.previousSibling.type==\'radio\')">'.$option.
'</span>';