24 include_once(
"./Services/Form/classes/class.ilRadioOption.php");
57 $this->options[] = $a_option;
77 $this->value = $a_value;
100 foreach($option->getSubItems() as $item)
102 $item->setValueByArray($a_values);
120 $this->
setAlert($lng->txt(
"msg_input_is_required"));
128 foreach($option->getSubItems() as $item)
130 $item_ok = $item->checkInput();
131 if (!$item_ok && ($_POST[$this->
getPostVar()] == $option->getValue()))
151 if ($option->getInfo() !=
"")
153 $a_tpl->setCurrentBlock(
"radio_option_desc");
154 $a_tpl->setVariable(
"RADIO_OPTION_DESC", $option->getInfo());
155 $a_tpl->parseCurrentBlock();
158 $a_tpl->setCurrentBlock(
"prop_radio_option");
159 $a_tpl->setVariable(
"POST_VAR", $this->
getPostVar());
160 $a_tpl->setVariable(
"VAL_RADIO_OPTION", $option->getValue());
161 $a_tpl->setVariable(
"OP_ID", $this->
getFieldId().
"_".$option->getValue());
164 $a_tpl->setVariable(
'DISABLED',
'disabled="disabled" ');
166 if ($option->getValue() == $this->
getValue())
168 $a_tpl->setVariable(
"CHK_RADIO_OPTION",
169 'checked="checked"');
171 $a_tpl->setVariable(
"TXT_RADIO_OPTION", $option->getTitle());
173 if (count($option->getSubItems()) > 0)
176 $pf->setMode(
"subform");
177 $pf->setItems($option->getSubItems());
178 $a_tpl->setVariable(
"SUB_FORM", $pf->getContent());
181 $a_tpl->parseCurrentBlock();
183 $a_tpl->setCurrentBlock(
"prop_radio");
184 $a_tpl->parseCurrentBlock();