From fecfe2e3a18d7b5cdf2caf76d03ed3ea2f53329e Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Sat, 11 Apr 2020 18:37:06 +0200 Subject: [PATCH 1/3] Keep compatibility with old object declaration --- htdocs/core/class/html.form.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4be8c74ffac..9b89a1bfc09 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6032,6 +6032,11 @@ class Form } if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow; } + else + { + $fieldstoshow = 't.ref'; // Keep compatibility with old object not declare yet fields + } + if (empty($fieldstoshow)) { if (isset($objecttmp->fields['ref'])) { From acab0200a692544bf66e6380af73e4c11368f9b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Apr 2020 16:46:21 +0200 Subject: [PATCH 2/3] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9b89a1bfc09..d08d230b3bd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6034,7 +6034,7 @@ class Form } else { - $fieldstoshow = 't.ref'; // Keep compatibility with old object not declare yet fields + $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref'); } if (empty($fieldstoshow)) From 697043bbd378a557755fd0f06efb9544747df446 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Apr 2020 16:47:56 +0200 Subject: [PATCH 3/3] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d08d230b3bd..6f911260afd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6034,7 +6034,8 @@ class Form } else { - $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref'); + // For backward compatibility + $objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1); } if (empty($fieldstoshow))