From 59cc3663a79b059f8431b8ac37f9bcfedc98e027 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Apr 2023 21:00:56 +0200 Subject: [PATCH] NEW Show picto into the combobox of widgets --- htdocs/core/class/html.formother.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 6bcd8ea1e6c..cce5cf7819d 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1207,7 +1207,7 @@ class FormOther if (preg_match('/graph/', $box->class) && $conf->browser->layout != 'phone') { $label = $label.' '; } - $arrayboxtoactivatelabel[$box->id] = $label; // We keep only boxes not shown for user, to show into combo list + $arrayboxtoactivatelabel[$box->id] = array('label'=>$label, 'data-html'=>img_picto('', $box->boximg, 'class="pictofixedwidth"').$langs->trans($label)); // We keep only boxes not shown for user, to show into combo list } foreach ($boxidactivatedforuser as $boxid) { if (empty($boxorder)) { @@ -1226,7 +1226,7 @@ class FormOther $selectboxlist .= ''; $selectboxlist .= ''; $selectboxlist .= ''; - $selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone hideonprint', 0, 'hidden selected', 0, 1); + $selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone hideonprint', 0, 'hidden selected', 0, 0); if (empty($conf->use_javascript_ajax)) { $selectboxlist .= ' '; }