Suppression d'un test
This commit is contained in:
parent
88504e63f7
commit
268f9edb38
@ -2973,14 +2973,14 @@ class Form
|
|||||||
\param show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
|
\param show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
|
||||||
\param key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
\param key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||||
\param value_as_key 1 pour utiliser la valeur comme clé
|
\param value_as_key 1 pour utiliser la valeur comme clé
|
||||||
\param optionType Type de l'option: 1 pour des fonctions javascript, 2 pour des tooltip, 3 les deux
|
\param optionType Type de l'option: 1 pour des fonctions javascript
|
||||||
\param option Valeur de l'option en fonciton du type choisi
|
\param option Valeur de l'option en fonction du type choisi
|
||||||
\param translate Traduire la valeur
|
\param translate Traduire la valeur
|
||||||
*/
|
*/
|
||||||
function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0)
|
function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
if (($optionType == 1 || $optionType == 3) && $option != '')
|
if ($optionType == 1 && $option != '')
|
||||||
{
|
{
|
||||||
print '<select class="flat" name="'.$htmlname.'" '.$option.'>';
|
print '<select class="flat" name="'.$htmlname.'" '.$option.'>';
|
||||||
}
|
}
|
||||||
@ -3008,27 +3008,13 @@ class Form
|
|||||||
if ($key_in_label)
|
if ($key_in_label)
|
||||||
{
|
{
|
||||||
$selectOptionValue = $key.' - '.($translate?$langs->trans($value):$value);
|
$selectOptionValue = $key.' - '.($translate?$langs->trans($value):$value);
|
||||||
if (($optionType == 2 || $optionType == 3) && $option != '')
|
print $selectOptionValue;
|
||||||
{
|
|
||||||
print $this->textwithtooltip($selectOptionValue,$option,1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $selectOptionValue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$selectOptionValue = ($translate?$langs->trans($value):$value);
|
$selectOptionValue = ($translate?$langs->trans($value):$value);
|
||||||
if ($value == '' || $value == '-') { $value=' '; }
|
if ($value == '' || $value == '-') { $selectOptionValue=' '; }
|
||||||
if (($optionType == 2 || $optionType == 3) && $option != '')
|
print $selectOptionValue;
|
||||||
{
|
|
||||||
print $this->textwithtooltip($selectOptionValue,$option,1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $selectOptionValue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
print "</option>\n";
|
print "</option>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user