mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix: Parameter PRODUIT_USE_SEARCH_TO_SELECT wa not used
This commit is contained in:
@@ -838,7 +838,7 @@ class Form
|
|||||||
* \param selected Preselected products
|
* \param selected Preselected products
|
||||||
* \param htmlname Name of HTML seletc field (must be unique in page)
|
* \param htmlname Name of HTML seletc field (must be unique in page)
|
||||||
* \param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
|
* \param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
|
||||||
* \param limit Limit sur le nombre de lignes retournees
|
* \param limit Limit on number of returned lines
|
||||||
* \param price_level Level of price to show
|
* \param price_level Level of price to show
|
||||||
* \param status -1=Return all products, 0=Products not on sell, 1=Products on sell
|
* \param status -1=Return all products, 0=Products not on sell, 1=Products on sell
|
||||||
* \param finished 2=all, 1=finished, 0=raw material
|
* \param finished 2=all, 1=finished, 0=raw material
|
||||||
@@ -850,7 +850,7 @@ class Form
|
|||||||
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
|
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
|
||||||
{
|
{
|
||||||
// mode=1 means customers products
|
// mode=1 means customers products
|
||||||
print ajax_autocompleter('',$htmlname,DOL_URL_ROOT.'/product/ajaxproducts.php','outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished);
|
print ajax_autocompleter('', $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
|
||||||
print $langs->trans("RefOrLabel").' : <input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'">';
|
print $langs->trans("RefOrLabel").' : <input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'">';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@@ -1117,7 +1117,7 @@ class Form
|
|||||||
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
|
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
|
||||||
{
|
{
|
||||||
// mode=2 means suppliers products
|
// mode=2 means suppliers products
|
||||||
print ajax_autocompleter('',$htmlname,DOL_URL_ROOT.'/product/ajaxproducts.php','outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished);
|
print ajax_autocompleter('', $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
|
||||||
print $langs->trans("RefOrLabel").' : <input type="text" size="16" name="search_'.$htmlname.'" id="search_'.$htmlname.'">';
|
print $langs->trans("RefOrLabel").' : <input type="text" size="16" name="search_'.$htmlname.'" id="search_'.$htmlname.'">';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,11 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get value of field, do Ajax process and return result
|
* Get value of an HTML field, do Ajax process and show result
|
||||||
* @param htmlname nom et id du champ
|
* @param htmlname HTML name of input field
|
||||||
* @param url chemin du fichier de reponse : /chemin/fichier.php
|
* @param url Url for request: /chemin/fichier.php
|
||||||
|
* @param option More parameters on URL request
|
||||||
|
* @param minLength Minimum number of chars to trigger tha Ajax search
|
||||||
* @return string script complet
|
* @return string script complet
|
||||||
*/
|
*/
|
||||||
function ajax_autocompleter($selected='',$htmlname,$url,$option='',$minLength=2)
|
function ajax_autocompleter($selected='',$htmlname,$url,$option='',$minLength=2)
|
||||||
|
|||||||
Reference in New Issue
Block a user