Merge pull request #17952 from ibuiv/bugfix-extrafields-float
fix wrong display on extrafields type = double
This commit is contained in:
commit
f3b53c18c4
@ -1613,7 +1613,7 @@ class ExtraFields
|
|||||||
if (!empty($extrafieldsobjectkey)) {
|
if (!empty($extrafieldsobjectkey)) {
|
||||||
$label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
|
$label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
|
||||||
$type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
|
$type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
|
||||||
$size = (int) $this->attributes[$extrafieldsobjectkey]['size'][$key];
|
$size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'...
|
||||||
$default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
|
$default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
|
||||||
$computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
|
$computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
|
||||||
$unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
|
$unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
|
||||||
@ -1911,7 +1911,7 @@ class ExtraFields
|
|||||||
} elseif ($type == 'password') {
|
} elseif ($type == 'password') {
|
||||||
$value = dol_trunc(preg_replace('/./i', '*', $value), 8, 'right', 'UTF-8', 1);
|
$value = dol_trunc(preg_replace('/./i', '*', $value), 8, 'right', 'UTF-8', 1);
|
||||||
} else {
|
} else {
|
||||||
$showsize = round($size);
|
$showsize = round((float) $size);
|
||||||
if ($showsize > 48) {
|
if ($showsize > 48) {
|
||||||
$showsize = 48;
|
$showsize = 48;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user