5 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
45 $this->suffix = $a_value;
65 $this->value = str_replace(
',',
'.', $a_value);
68 if($this->value !=
"")
73 $this->value = round($this->value);
79 $this->value = round($this->value, $this->
getDecimals());
82 $this->value = number_format($this->value, $this->
getDecimals(),
".",
"");
104 $this->maxlength = $a_maxlength;
164 $this->size = $a_size;
194 $this->minvalue = $a_minvalue;
214 $this->maxvalue = $a_maxvalue;
234 $this->decimals = (int)$a_decimals;
258 $this->allow_decimals = (bool)$a_value;
283 $this->
setAlert($lng->txt(
"msg_input_is_required"));
291 $this->
setAlert($lng->txt(
"form_msg_numeric_value_required"));
302 $this->
setAlert($lng->txt(
"form_msg_value_too_low"));
313 $this->
setAlert($lng->txt(
"form_msg_value_too_low"));
325 $this->
setAlert($lng->txt(
"form_msg_value_too_high"));
336 $this->
setAlert($lng->txt(
"form_msg_value_too_high"));
354 $a_tpl->setCurrentBlock(
"prop_generic");
355 $a_tpl->setVariable(
"PROP_GENERIC", $html);
356 $a_tpl->parseCurrentBlock();
366 $tpl =
new ilTemplate(
"tpl.prop_number.html",
true,
true,
"Services/Form");
370 $tpl->setCurrentBlock(
"prop_number_propval");
372 $tpl->parseCurrentBlock();
374 $tpl->setCurrentBlock(
"prop_number");
383 $tpl->setVariable(
"DISABLED",
384 " disabled=\"disabled\"");
394 $constraints = $lng->txt(
"form_format").
": ###.".str_repeat(
"#", $this->
getDecimals());
399 $constraints.= $delim.$lng->txt(
"form_min_value").
": ".(($this->
minvalueShouldBeGreater()) ?
"> " :
"").$this->getMinValue();
404 $constraints.= $delim.$lng->txt(
"form_max_value").
": ".(($this->
maxvalueShouldBeLess()) ?
"< " :
"").$this->getMaxValue();
407 if ($constraints !=
"")
409 $tpl->setVariable(
"TXT_NUMBER_CONSTRAINTS", $constraints);
412 $tpl->parseCurrentBlock();