From b7f697e8c49eebeb1d883970de31ae575037a8cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Jun 2013 22:27:02 +0200 Subject: [PATCH] Remove a call of a deprecated function --- htdocs/cashdesk/admin/cashdesk.php | 3 ++- htdocs/core/class/html.form.class.php | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 91700e328df..217b184f1d9 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -103,7 +103,8 @@ print "\n"; $var=!$var; print ''.$langs->trans("CashDeskThirdPartyForSell").''; print ''; -print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,1); +//print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,1); +print $form->select_thirdparty($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',0,array(),1); print ''; if (! empty($conf->banque->enabled)) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d753803dc54..87bc7dff59f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -661,16 +661,18 @@ class Form * * @param int $selected Preselected products * @param string $htmlname Name of HTML seletc field (must be unique in page) - * @param int $filtertype Filter on product type (''=nofilter, 0=product, 1=service) + * @param int $filter Filter on thirdparty * @param int $limit Limit on number of returned lines * @param array $ajaxoptions Options for ajax_autocompleter + * @param int $forcecombo Force to use combo box * @return void */ - function select_thirdparty($selected='', $htmlname='productid', $filtertype='', $limit=20, $ajaxoptions=array()) + function select_thirdparty($selected='', $htmlname='productid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0) { global $langs,$conf; - - if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) + + /* TODO Use ajax autocompletion (not finished) + if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT) && ! $forcecombo) { $placeholder=''; @@ -698,9 +700,9 @@ class Form } } else - { - print $this->select_thirdparty_list($selected,$htmlname,$filtertype,1,0,1,array(),'',0,$limit); - } + {*/ + print $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0,$limit); + //} } /**