Fix: more simple

This commit is contained in:
Regis Houssin 2011-08-30 17:51:12 +00:00
parent 646778a497
commit a5f7bf3903
5 changed files with 9 additions and 11 deletions

View File

@ -898,6 +898,8 @@ class Form
{ {
global $langs,$conf; global $langs,$conf;
$price_level = (! empty($price_level) ? $price_level : 0);
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT) if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
{ {
if ($selected && empty($selected_input_value)) if ($selected && empty($selected_input_value))
@ -911,12 +913,13 @@ class Form
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT); print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
if (! $hidelabel) print $langs->trans("RefOrLabel").' : '; if (! $hidelabel) print $langs->trans("RefOrLabel").' : ';
print '<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'" />'; print '<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'" />';
print '<br>';
} }
else else
{ {
$this->select_produits_do($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0); $this->select_produits_do($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0);
} }
print '<br />';
} }
/** /**

View File

@ -49,7 +49,7 @@
if (is_object($hookmanager)) if (is_object($hookmanager))
{ {
$parameters=array(); $parameters=array();
$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); echo $hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
} }
// Editor wysiwyg // Editor wysiwyg

View File

@ -41,7 +41,7 @@
if (is_object($hookmanager)) if (is_object($hookmanager))
{ {
$parameters=array('fk_parent_line'=>$line->fk_parent_line); $parameters=array('fk_parent_line'=>$line->fk_parent_line);
$hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action); echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
} }
// editeur wysiwyg // editeur wysiwyg

View File

@ -50,18 +50,13 @@
<tr <?php echo $bcnd[$var]; ?>> <tr <?php echo $bcnd[$var]; ?>>
<td colspan="3"> <td colspan="3">
<?php <?php
// multiprix
if($conf->global->PRODUIT_MULTIPRICES)
$html->select_produits('','idprod','',$conf->product->limit_size,$buyer->price_level);
else
$html->select_produits('','idprod','',$conf->product->limit_size);
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) echo '<br>'; $html->select_produits('','idprod','',$conf->product->limit_size,$buyer->price_level);
if (is_object($hookmanager)) if (is_object($hookmanager))
{ {
$parameters=array('fk_parent_line'=>$_POST["fk_parent_line"]); $parameters=array('fk_parent_line'=>$_POST["fk_parent_line"]);
$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); echo $hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
} }
// Editor wysiwyg // Editor wysiwyg

View File

@ -51,7 +51,7 @@
{ {
$fk_parent_line = ($_POST["fk_parent_line"] ? $_POST["fk_parent_line"] : $line->fk_parent_line); $fk_parent_line = ($_POST["fk_parent_line"] ? $_POST["fk_parent_line"] : $line->fk_parent_line);
$parameters=array('fk_parent_line'=>$fk_parent_line); $parameters=array('fk_parent_line'=>$fk_parent_line);
$hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action); echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
} }
// editeur wysiwyg // editeur wysiwyg