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();
148 $tpl =
new ilTemplate(
"tpl.prop_radio.html",
true,
true,
"Services/Form");
153 if ($option->getInfo() !=
"")
155 $tpl->setCurrentBlock(
"radio_option_desc");
156 $tpl->setVariable(
"RADIO_OPTION_DESC", $option->getInfo());
157 $tpl->parseCurrentBlock();
161 if (count($option->getSubItems()) > 0)
163 if ($option->getValue() != $this->
getValue())
165 $tpl->touchBlock(
"prop_radio_opt_hide");
166 $tpl->setVariable(
"HOP_ID", $this->
getFieldId().
"_".$option->getValue());
167 $tpl->parseCurrentBlock();
169 $tpl->setCurrentBlock(
"radio_option_subform");
171 $pf->setMode(
"subform");
172 $pf->setItems($option->getSubItems());
173 $tpl->setVariable(
"SUB_FORM", $pf->getContent());
174 $tpl->setVariable(
"SOP_ID", $this->
getFieldId().
"_".$option->getValue());
175 if ($pf->getMultipart())
179 $tpl->parseCurrentBlock();
180 if ($pf->getMultipart())
186 $tpl->setCurrentBlock(
"prop_radio_option");
191 $tpl->setVariable(
"VAL_RADIO_OPTION", $option->getValue());
192 $tpl->setVariable(
"OP_ID", $this->
getFieldId().
"_".$option->getValue());
196 $tpl->setVariable(
'DISABLED',
'disabled="disabled" ');
198 if ($option->getValue() == $this->
getValue())
200 $tpl->setVariable(
"CHK_RADIO_OPTION",
201 'checked="checked"');
203 $tpl->setVariable(
"TXT_RADIO_OPTION", $option->getTitle());
206 $tpl->parseCurrentBlock();
212 $tpl->setVariable(
"HIDDEN_INPUT",
216 $a_tpl->setCurrentBlock(
"prop_generic");
217 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
218 $a_tpl->parseCurrentBlock();
236 foreach($option->getSubItems() as $item)
238 if ($item->getType() !=
"section_header")
240 $ret = $item->getItemByPostVar($a_post_var);