5 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
40 $this->lng = $DIC->language();
51 $this->suffix = $a_value;
71 $this->value = str_replace(
',',
'.', $a_value);
74 if ($this->value !=
"") {
77 $this->value = round($this->value);
82 $this->value = round($this->value, $this->
getDecimals());
85 $this->value = number_format($this->value, $this->
getDecimals(),
".",
"");
107 $this->maxlength = $a_maxlength;
167 $this->size = $a_size;
196 public function setMinValue($a_minvalue, $a_display_always =
false)
198 $this->minvalue = $a_minvalue;
199 $this->minvalue_visible = (bool) $a_display_always;
218 public function setMaxValue($a_maxvalue, $a_display_always =
false)
220 $this->maxvalue = $a_maxvalue;
221 $this->maxvalue_visible = (bool) $a_display_always;
241 $this->decimals = (int) $a_decimals;
242 if ($this->decimals) {
264 $this->allow_decimals = (bool) $a_value;
294 $this->minvalue_visible =
true;
295 $this->maxvalue_visible =
true;
296 $this->
setAlert(
$lng->txt(
"form_msg_numeric_value_required"));
304 $this->minvalue_visible =
true;
312 $this->minvalue_visible =
true;
322 $this->maxvalue_visible =
true;
330 $this->maxvalue_visible =
true;
348 $a_tpl->setCurrentBlock(
"prop_generic");
349 $a_tpl->setVariable(
"PROP_GENERIC", $html);
350 $a_tpl->parseCurrentBlock();
360 $tpl =
new ilTemplate(
"tpl.prop_number.html",
true,
true,
"Services/Form");
363 $tpl->setCurrentBlock(
"prop_number_propval");
365 $tpl->parseCurrentBlock();
367 $tpl->setCurrentBlock(
"prop_number");
379 " disabled=\"disabled\"" 383 if ($this->client_side_validation) {
391 $constraints =
$lng->txt(
"form_format") .
": ###." . str_repeat(
"#", $this->
getDecimals());
394 if ($this->
getMinValue() !==
false && $this->minvalue_visible) {
398 if ($this->
getMaxValue() !==
false && $this->maxvalue_visible) {
402 if ($constraints !=
"") {
403 $tpl->setVariable(
"TXT_NUMBER_CONSTRAINTS", $constraints);
407 $tpl->setVariable(
"REQUIRED",
"required=\"required\"");
410 $tpl->parseCurrentBlock();
430 $this->client_side_validation = $validate;
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(Container $dic, ilPlugin $plugin)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl