new add filter on link

allow to add a filter on array as defined on selectForForms
with remplacement id
// Bom:bom/class/bom.class.php:0:(t.fk_product:=:$ID$):ref
This commit is contained in:
Charlène Benke 2023-08-10 09:37:20 +02:00 committed by GitHub
parent f681d140a5
commit 5bbcfd2c4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
* Copyright (C) 2009-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <forian.henry@open-concept.pro>
* Copyright (C) 2015 Charles-Fr BENKE <charles.fr@benke.fr>
* Copyright (C) 2015-2023 Charlene BENKE <charlene@patas-monkey.com>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
@ -1554,6 +1554,8 @@ class ExtraFields
}
} elseif ($type == 'link') {
$param_list = array_keys($param['options']); // $param_list='ObjectName:classPath'
if (strpos($param_list[0], '$ID$') !== false && !empty($objectid))
$param_list[0] = str_replace('$ID$', $objectid, $param_list[0]);
$showempty = (($required && $default != '') ? 0 : 1);
$out = $form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss);
} elseif ($type == 'password') {