Merge pull request #11717 from fbosman/patch-1
NEW Add hidden option THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER to copy extrafields from third party to order
This commit is contained in:
commit
79d6731936
@ -1758,7 +1758,15 @@ if ($action == 'create' && $usercancreate)
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
if (! empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER))
|
||||
// copy from thirdparty
|
||||
$tpExtrafields = new Extrafields($db);
|
||||
$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
|
||||
if ($soc->fetch_optionals() > 0) {
|
||||
$object->array_options = array_merge($object->array_options, $soc->array_options);
|
||||
}
|
||||
};
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
// Template to use by default
|
||||
|
||||
Loading…
Reference in New Issue
Block a user