From 76e8384f096f25e40b1e02de9bdef59ccfd83195 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Aug 2019 16:06:19 +0200 Subject: [PATCH] NEW Add option multiselect for developers on the selector of language. --- htdocs/core/class/html.formadmin.class.php | 7 ++++--- htdocs/core/lib/functions.lib.php | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 166e0ce2044..adf3c1cad03 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -57,9 +57,10 @@ class FormAdmin * @param string $morecss Add more css styles * @param int $showcode 1=Add language code into label at begining, 2=Add language code into label at end * @param int $forcecombo Force to use combo box (so no ajax beautify effect) + * @param int $multiselect Make the combo a multiselect * @return string Return HTML select string with list of languages */ - public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0) + public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0, $multiselect = 0) { // phpcs:enable global $conf, $langs; @@ -70,8 +71,8 @@ class FormAdmin $out=''; - $out.= ''; + if ($showempty && ! $multiselect) { $out.= '