5include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
 
   39        $this->lng = 
$DIC->language();
 
   40        parent::__construct($a_title, $a_postvar);
 
   50        $this->suffix = $a_value;
 
   70        $this->value = str_replace(
',', 
'.', $a_value);
 
   73        if ($this->value != 
"") {
 
   76                $this->value = round($this->value);
 
   81                $this->value = round($this->value, $this->
getDecimals());
 
   84                $this->value = number_format($this->value, $this->
getDecimals(), 
".", 
"");
 
  106        $this->maxlength = $a_maxlength;
 
  166        $this->size = $a_size;
 
  195    public function setMinValue($a_minvalue, $a_display_always = 
false)
 
  197        $this->minvalue = $a_minvalue;
 
  198        $this->minvalue_visible = (bool) $a_display_always;
 
  217    public function setMaxValue($a_maxvalue, $a_display_always = 
false)
 
  219        $this->maxvalue = $a_maxvalue;
 
  220        $this->maxvalue_visible = (bool) $a_display_always;
 
  240        $this->decimals = (int) $a_decimals;
 
  241        if ($this->decimals) {
 
  263        $this->allow_decimals = (bool) $a_value;
 
  293            $this->minvalue_visible = 
true;
 
  294            $this->maxvalue_visible = 
true;
 
  295            $this->
setAlert(
$lng->txt(
"form_msg_numeric_value_required"));
 
  303                $this->minvalue_visible = 
true;
 
  311                $this->minvalue_visible = 
true;
 
  321                $this->maxvalue_visible = 
true;
 
  329                $this->maxvalue_visible = 
true;
 
  347        $a_tpl->setCurrentBlock(
"prop_generic");
 
  348        $a_tpl->setVariable(
"PROP_GENERIC", 
$html);
 
  349        $a_tpl->parseCurrentBlock();
 
  359        $tpl = 
new ilTemplate(
"tpl.prop_number.html", 
true, 
true, 
"Services/Form");
 
  362            $tpl->setCurrentBlock(
"prop_number_propval");
 
  364            $tpl->parseCurrentBlock();
 
  366        $tpl->setCurrentBlock(
"prop_number");
 
  378                " disabled=\"disabled\"" 
  388            $constraints = 
$lng->txt(
"form_format") . 
": ###." . str_repeat(
"#", $this->
getDecimals());
 
  391        if ($this->
getMinValue() !== 
false && $this->minvalue_visible) {
 
  395        if ($this->
getMaxValue() !== 
false && $this->maxvalue_visible) {
 
  399        if ($constraints != 
"") {
 
  400            $tpl->setVariable(
"TXT_NUMBER_CONSTRAINTS", $constraints);
 
  404            $tpl->setVariable(
"REQUIRED", 
"required=\"required\"");
 
  407        $tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public