From 9e86e5ce93f35a358df79046882ebf2234640c85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Jan 2022 01:43:53 +0100 Subject: [PATCH] Fix creation of page --- htdocs/core/class/html.form.class.php | 50 +++++++-------- htdocs/website/index.php | 87 ++++++++++++++++----------- 2 files changed, 77 insertions(+), 60 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 88fca7b536a..5142bf00d4c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7993,6 +7993,31 @@ class Form } } + // Try also magic suggest + $out .= ''."\n"; - if (is_array($array) && !empty($array)) { - if ($value_as_key) { - $array = array_combine($array, $array); - } - - if (!empty($array)) { - foreach ($array as $key => $value) { - $newval = ($translate ? $langs->trans($value) : $value); - $newval = ($key_in_label ? $key.' - '.$newval : $newval); - - $out .= '