fix:boolean values in showinputfield are 1 and 0 not 'on' and 'off'
This commit is contained in:
parent
c539c6d00d
commit
ad21f1e293
@ -74,7 +74,7 @@ if ($action == 'add' && !empty($permissiontoadd))
|
|||||||
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
|
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
|
||||||
$value = price2num(GETPOST($key, 'alphanohtml')); // To fix decimal separator according to lang setup
|
$value = price2num(GETPOST($key, 'alphanohtml')); // To fix decimal separator according to lang setup
|
||||||
} elseif ($object->fields[$key]['type'] == 'boolean') {
|
} elseif ($object->fields[$key]['type'] == 'boolean') {
|
||||||
$value = (GETPOST($key) == 'on' ? 1 : 0);
|
$value = (GETPOST($key) == '1' ? 1 : 0);
|
||||||
} else {
|
} else {
|
||||||
$value = GETPOST($key, 'alphanohtml');
|
$value = GETPOST($key, 'alphanohtml');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user