Fix: use parameter instead constant

This commit is contained in:
Regis Houssin 2016-10-12 15:36:51 +02:00
parent d848e98759
commit 6423b23fb3

View File

@ -357,7 +357,7 @@ function ajax_dialog($title,$message,$w=350,$h=150)
* @param int $forcefocus Force focus on field * @param int $forcefocus Force focus on field
* @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason. * @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason.
*/ */
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0) function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve')
{ {
global $conf; global $conf;
@ -366,7 +366,6 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return ''; if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
if (empty($conf->use_javascript_ajax)) return ''; if (empty($conf->use_javascript_ajax)) return '';
$widthTypeOfAutocomplete = (!empty($conf->global->MAIN_WIDTH_TYPE_OF_AUTOCOMPLETE) ? $conf->global->MAIN_WIDTH_TYPE_OF_AUTOCOMPLETE : 'resolve');
if (empty($minLengthToAutocomplete)) $minLengthToAutocomplete=0; if (empty($minLengthToAutocomplete)) $minLengthToAutocomplete=0;
$tmpplugin='select2'; $tmpplugin='select2';