FIX: quickedit code missing on product card

This commit is contained in:
jyhere 2023-07-07 11:42:54 +02:00 committed by GitHub
parent 91f19cfaa9
commit 862dbf7e23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -448,6 +448,30 @@ if (empty($reshook)) {
}
}
// Quick edit for extrafields
if ($action == 'update_extras') {
$object->oldcopy = dol_clone($object);
// Fill array 'array_options' with data from update form
$ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml'));
if ($ret < 0) {
$error++;
}
if (!$error) {
// Actions on extra fields
$result = $object->insertExtraFields('PRODUCT_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
}
if ($error) {
$action = 'edit_extras';
}
}
// Add a product or service
if ($action == 'add' && $usercancreate) {
$error = 0;