2
0
forked from Wavyzz/dolibarr

fix:value of checked option must be the same as in showInputfield function

This commit is contained in:
bahfir abbes
2020-08-03 14:31:33 +01:00
committed by Laurent Destailleur
parent 0e03578e91
commit 13202dfc7c

View File

@@ -165,7 +165,7 @@ if ($action == 'update' && !empty($permissiontoadd))
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
$value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup
} elseif ($object->fields[$key]['type'] == 'boolean') {
$value = (GETPOST($key) == 'on' ? 1 : 0);
$value = (GETPOST($key) == '1' ? 1 : 0);
} else {
$value = GETPOST($key, 'alpha');
}