diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6c75d2ab9a2..d4c472d8f6d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -545,7 +545,7 @@ class Form if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.entity = ".$conf->entity; if ($filter) $sql.= " AND ".$filter; - if (is_numeric($selected) && $conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) $sql.= " AND s.rowid = ".$selected; + //if (is_numeric($selected) && $conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) $sql.= " AND s.rowid = ".$selected; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " ORDER BY nom ASC"; @@ -555,6 +555,7 @@ class Form { if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo) { + /* $minLength = (is_numeric($conf->global->COMPANY_USE_SEARCH_TO_SELECT)?$conf->global->COMPANY_USE_SEARCH_TO_SELECT:2); $socid = 0; @@ -578,10 +579,16 @@ class Form $out.= ajax_autocompleter(($socid?$socid:-1),$htmlname,DOL_URL_ROOT.'/societe/ajaxcompanies.php?filter='.urlencode($filter), '', $minLength); $out.= ''; $out.= ''; - $out.= ''; + $out.= '';*/ + + $out.= ''; } - else - { + //else + //{ $out.= ''; - } + //} } else { @@ -1539,7 +1546,7 @@ class Form * \param filtertype Pour filtre * \param addempty Ajoute entree vide */ - function select_availability($selected='',$htmlname='availid',$filtertype='',$addempty=0) + function select_availability($selected='',$htmlname='availid',$filtertype='',$addempty=0) { global $langs,$user; @@ -1609,7 +1616,7 @@ class Form * \param filtertype Pour filtre * \param addempty Ajoute entree vide */ - function select_source($selected='',$htmlname='sourceid',$filtertype='',$addempty=0) + function select_source($selected='',$htmlname='sourceid',$filtertype='',$addempty=0) { global $langs,$user; @@ -1980,7 +1987,7 @@ class Form * @param height Force height of box * @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form */ - function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=0) + function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=400) { global $langs,$conf; @@ -1988,8 +1995,6 @@ class Form $formconfirm=''; $inputarray=array(); - if (empty($height)) $height=170; - if ($formquestion) { $more.=''."\n"; @@ -1998,11 +2003,11 @@ class Form { if ($input['type'] == 'text') { - $more.=''."\n"; + $more.=''."\n"; } if ($input['type'] == 'password') { - $more.=''."\n"; + $more.=''."\n"; } if ($input['type'] == 'select') { @@ -2014,15 +2019,12 @@ class Form if ($input['type'] == 'checkbox') { $more.=''; - //$more.='
'.$input['label'].'
'.$input['label'].'
'.$input['label'].'
'.$input['label'].'
'.$input['label'].'  '; $more.=''.$input['label'].' '; $more.=''; - $formconfirm.= img_help('','').' '.$question; if (! empty($more)) $formconfirm.= '

'.$more.'

'; + $formconfirm.= img_help('','').' '.$question; $formconfirm.= ''."\n"; $formconfirm.= '