X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/6e59f47d1baf9e3d420b4a368dcc005d54b6e599..a4d1c5627c3958245ea7e2e573267e34f5872471:/WEB-INF/lib/form/FloatField.class.php diff --git a/WEB-INF/lib/form/FloatField.class.php b/WEB-INF/lib/form/FloatField.class.php index 298e09bb..6bbfd64c 100644 --- a/WEB-INF/lib/form/FloatField.class.php +++ b/WEB-INF/lib/form/FloatField.class.php @@ -32,14 +32,13 @@ class FloatField extends TextField { var $mDelimiter = '.'; var $mFFormat; - var $cClassName = 'FloatField'; + var $class = 'FloatField'; function __construct($name) { $this->name = $name; } - function setLocalization($i18n) { - FormElement::setLocalization($i18n); + function localize($i18n) { global $user; $this->mDelimiter = $user->decimal_mark; } @@ -54,19 +53,19 @@ class FloatField extends TextField { $value = sprintf('%'.$this->mFFormat.'f', $value); $value = str_replace('.', $this->mDelimiter, $value); } - $this->mValue = $value; + $this->value = $value; } function setValueSafe($value) { // '.' to ',' , apply delimiter if (strlen($value) > 0) - $this->mValue = str_replace('.', $this->mDelimiter, $value); + $this->value = str_replace('.', $this->mDelimiter, $value); } function getValueSafe() { // ',' to '.' - if (strlen($this->mValue) > 0) - return str_replace($this->mDelimiter, '.', $this->mValue); + if (strlen($this->value) > 0) + return str_replace($this->mDelimiter, '.', $this->value); return null; } }