diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 84af1c5325b..146c544b32e 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1347,7 +1347,7 @@ class Form
* @param string $moreclass Add more class to class style
* @param bool $options_only Return options only (for ajax treatment)
* @param integer $showsoc Add company into label
- * @param int $forcecombo Force to use combo box
+ * @param int $forcecombo Force to use combo box (so no ajax beautify effect)
* @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @param string $htmlid Html id to use instead of htmlname
@@ -1554,7 +1554,7 @@ class Form
else $sql.= " WHERE u.entity IS NOT NULL";
}
else
- {
+ {
if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug";
diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php
index fd0470c63f4..8c2af9c9f3a 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -56,9 +56,10 @@ class FormAdmin
* @param int $disabled Disable edit of select
* @param string $morecss Add more css styles
* @param int $showcode Add language code into label
+ * @param int $forcecombo Force to use combo box (so no ajax beautify effect)
* @return string Return HTML select string with list of languages
*/
- function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0)
+ function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0)
{
global $langs;
@@ -109,8 +110,11 @@ class FormAdmin
$out.= '';
// Make select dynamic
- include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
- $out.= ajax_combobox($htmlname);
+ if (! $forcecombo)
+ {
+ include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
+ $out.= ajax_combobox($htmlname);
+ }
return $out;
}
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 6d3dc5d9fd2..f1aa69d22d4 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -1803,7 +1803,7 @@ if (count($object->records) > 0)
$formquestion = array(
array('type' => 'text', 'tdclass'=>'maxwidth200', 'name' => 'pageurl', 'label'=> $langs->trans("WEBSITE_PAGENAME"), 'value'=> 'copy_of_'.$objectpage->pageurl),
array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0),
- array('type' => 'other','name' => 'newlang', 'label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'az09')?GETPOST('newlang', 'az09'):$langs->defaultlang, 'newlang', 0, null, 1, 0, 0, 'minwidth200')),
+ array('type' => 'other','name' => 'newlang', 'label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'az09')?GETPOST('newlang', 'az09'):$langs->defaultlang, 'newlang', 0, null, 1, 0, 0, 'minwidth200', 0, 1)),
array('type' => 'other','name' => 'newwebsite', 'label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0)),
);