FIX: quickedit code missing on product card
This commit is contained in:
parent
91f19cfaa9
commit
862dbf7e23
1 changed files with 24 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue