Enable select2 for users combo

This commit is contained in:
Laurent Destailleur 2015-02-07 03:41:09 +01:00
parent 7738478564
commit a21acdeb7c

View File

@ -1229,13 +1229,13 @@ class Form
{ {
// Enhance with select2 // Enhance with select2
$nodatarole=''; $nodatarole='';
/*if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$comboenhancement = ajax_combobox($htmlname); $comboenhancement = ajax_combobox($htmlname);
$out.= $comboenhancement; $out.=$comboenhancement;
$nodatarole=($comboenhancement?' data-role="none"':''); $nodatarole=($comboenhancement?' data-role="none"':'');
}*/ }
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').$nodatarole.'>'; $out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').$nodatarole.'>';
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected="selected"':'').'>&nbsp;</option>'."\n"; if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected="selected"':'').'>&nbsp;</option>'."\n";