Fix Show double(x,y) fields
This commit is contained in:
parent
3158fdc551
commit
adda3144bc
@ -5118,11 +5118,10 @@ $val=$this->fields[$key];
|
||||
{
|
||||
$morecss = 'minwidth200imp';
|
||||
}
|
||||
elseif (in_array($type,array('int','integer','double','price')))
|
||||
elseif (in_array($type,array('int','integer','price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/',$type))
|
||||
{
|
||||
$morecss = 'maxwidth75';
|
||||
}
|
||||
elseif ($type == 'url')
|
||||
}elseif ($type == 'url')
|
||||
{
|
||||
$morecss='minwidth400';
|
||||
}
|
||||
@ -5217,7 +5216,7 @@ $val=$this->fields[$key];
|
||||
}
|
||||
$out='<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
|
||||
}
|
||||
elseif ($type == 'double')
|
||||
elseif (preg_match('/^double(\([0-9],[0-9]\)){0,1}/',$type))
|
||||
{
|
||||
if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format.
|
||||
$value=price($value);
|
||||
|
||||
@ -263,8 +263,8 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='',
|
||||
$type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php'
|
||||
|
||||
if ($type == 'html') $type = 'text'; // html modulebuilder type is a text type in database
|
||||
if ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database
|
||||
|
||||
else if ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database
|
||||
else if ($type == 'link' || $type == 'sellist') $type = 'integer';
|
||||
$texttoinsert.= "\t".$key." ".$type;
|
||||
if ($key == 'rowid') $texttoinsert.= ' AUTO_INCREMENT PRIMARY KEY';
|
||||
if ($key == 'entity') $texttoinsert.= ' DEFAULT 1';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user