projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bit of cleanup in localization files.
[timetracker.git]
/
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
298e09b
..
b11f4a1
100644
(file)
--- a/
WEB-INF/lib/form/FloatField.class.php
+++ b/
WEB-INF/lib/form/FloatField.class.php
@@
-29,17
+29,15
@@
import('form.TextField');
class FloatField extends TextField {
import('form.TextField');
class FloatField extends TextField {
-
var $mDelimiter = '.';
var $mFFormat;
var $mDelimiter = '.';
var $mFFormat;
- var $cClassName = 'FloatField';
-
+
function __construct($name) {
function __construct($name) {
+ $this->class = 'FloatField';
$this->name = $name;
}
$this->name = $name;
}
- function setLocalization($i18n) {
- FormElement::setLocalization($i18n);
+ function localize($i18n) {
global $user;
$this->mDelimiter = $user->decimal_mark;
}
global $user;
$this->mDelimiter = $user->decimal_mark;
}
@@
-54,19
+52,19
@@
class FloatField extends TextField {
$value = sprintf('%'.$this->mFFormat.'f', $value);
$value = str_replace('.', $this->mDelimiter, $value);
}
$value = sprintf('%'.$this->mFFormat.'f', $value);
$value = str_replace('.', $this->mDelimiter, $value);
}
- $this->
mV
alue = $value;
+ $this->
v
alue = $value;
}
function setValueSafe($value) {
// '.' to ',' , apply delimiter
if (strlen($value) > 0)
}
function setValueSafe($value) {
// '.' to ',' , apply delimiter
if (strlen($value) > 0)
- $this->
mV
alue = str_replace('.', $this->mDelimiter, $value);
+ $this->
v
alue = str_replace('.', $this->mDelimiter, $value);
}
function getValueSafe() {
// ',' to '.'
}
function getValueSafe() {
// ',' to '.'
- if (strlen($this->
mV
alue) > 0)
- return str_replace($this->mDelimiter, '.', $this->
mV
alue);
+ if (strlen($this->
v
alue) > 0)
+ return str_replace($this->mDelimiter, '.', $this->
v
alue);
return null;
}
}
return null;
}
}