Merge pull request #14009 from bafbes/abb110218

fix:non editable fields must not be editable in creation either
This commit is contained in:
Laurent Destailleur 2020-06-01 20:57:55 +02:00 committed by GitHub
commit 56e5a3dae6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,8 @@ foreach ($object->fields as $key => $val)
if (in_array($val['type'], array('int', 'integer'))) $value = GETPOST($key, 'int');
elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOST($key, 'none');
else $value = GETPOST($key, 'alpha');
print $object->showInputField($val, $key, $value, '', '', '', 0);
if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0);
else print $object->showInputField($val, $key, $value, '', '', '', 0);
print '</td>';
print '</tr>';
}