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();
149 $a_tpl->setCurrentBlock(
"prop_generic");
150 $a_tpl->setVariable(
"PROP_GENERIC", $html);
151 $a_tpl->parseCurrentBlock();
159 $tpl =
new ilTemplate(
"tpl.prop_radio.html",
true,
true,
"Services/Form");
164 if ($option->getInfo() !=
"")
166 $tpl->setCurrentBlock(
"radio_option_desc");
167 $tpl->setVariable(
"RADIO_OPTION_DESC", $option->getInfo());
168 $tpl->parseCurrentBlock();
172 if (count($option->getSubItems()) > 0)
174 if ($option->getValue() != $this->
getValue())
176 $tpl->touchBlock(
"prop_radio_opt_hide");
177 $tpl->setVariable(
"HOP_ID", $this->
getFieldId().
"_".$option->getValue());
178 $tpl->parseCurrentBlock();
180 $tpl->setCurrentBlock(
"radio_option_subform");
182 $pf->setMode(
"subform");
183 $pf->setItems($option->getSubItems());
184 $tpl->setVariable(
"SUB_FORM", $pf->getContent());
185 $tpl->setVariable(
"SOP_ID", $this->
getFieldId().
"_".$option->getValue());
186 if ($pf->getMultipart())
190 $tpl->parseCurrentBlock();
191 if ($pf->getMultipart())
197 $tpl->setCurrentBlock(
"prop_radio_option");
202 $tpl->setVariable(
"VAL_RADIO_OPTION", $option->getValue());
203 $tpl->setVariable(
"OP_ID", $this->
getFieldId().
"_".$option->getValue());
207 $tpl->setVariable(
'DISABLED',
'disabled="disabled" ');
209 if ($option->getValue() == $this->
getValue())
211 $tpl->setVariable(
"CHK_RADIO_OPTION",
212 'checked="checked"');
214 $tpl->setVariable(
"TXT_RADIO_OPTION", $option->getTitle());
217 $tpl->parseCurrentBlock();
223 $tpl->setVariable(
"HIDDEN_INPUT",
244 foreach($option->getSubItems() as $item)
246 if ($item->getType() !=
"section_header")
248 $ret = $item->getItemByPostVar($a_post_var);