Fix look and feel v20

This commit is contained in:
Laurent Destailleur 2024-06-04 11:58:43 +02:00
parent 42470a113e
commit ae41b85a36

View file

@ -5044,7 +5044,7 @@ class Form
* @param string $htmlname Name of select zone
* @param int $status Status of searched accounts (0=open, 1=closed, 2=both)
* @param string $filtre To filter the list. This parameter must not come from input of users
* @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @param int|string $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @param string $moreattrib To add more attribute on select
* @param int $showcurrency Show currency in label
* @param string $morecss More CSS
@ -5079,7 +5079,10 @@ class Form
$i = 0;
if ($num) {
$out .= '<select id="select' . $htmlname . '" class="flat selectbankaccount' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '"' . ($moreattrib ? ' ' . $moreattrib : '') . '>';
if ($useempty == 1 || ($useempty == 2 && $num > 1)) {
if (!empty($useempty) && !is_numeric($useempty)) {
$out .= '<option value="-1">'.$langs->trans($useempty).'</option>';
} elseif ($useempty == 1 || ($useempty == 2 && $num > 1)) {
$out .= '<option value="-1">&nbsp;</option>';
}