Debug v20 - popup of combo go out of screen

This commit is contained in:
Laurent Destailleur 2024-06-24 15:08:16 +02:00
parent 856b23ddcb
commit 10e0f6f2ab
2 changed files with 8 additions and 6 deletions

View File

@ -57,15 +57,16 @@ class FormExpenseReport
* @param string $htmlname Name of HTML select
* @param int $useempty 1=Add empty line
* @param int $useshortlabel Use short labels
* @param string $morecss More CSS
* @return string HTML select with status
*/
public function selectExpensereportStatus($selected = 0, $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0)
public function selectExpensereportStatus($selected = 0, $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0, $morecss = '')
{
global $langs;
$tmpep = new ExpenseReport($this->db);
$html = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
$html = '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
if ($useempty) {
$html.='<option value="-1">&nbsp;</option>';
}
@ -82,9 +83,10 @@ class FormExpenseReport
$html .= $langs->trans($val);
$html .= '</option>';
}
$html .= '</select>';
$html .= ajax_combobox($htmlname);
print $html;
$html .= '</select>'."\n";
$html .= ajax_combobox($htmlname, array(), 0, 0, 'resolve', ($useempty < 0 ? (string) $useempty : '-1'), $morecss);
return $html;
}

View File

@ -681,7 +681,7 @@ if (!empty($arrayfields['d.tms']['checked'])) {
// Status
if (!empty($arrayfields['d.fk_statut']['checked'])) {
print '<td class="liste_titre center parentonrightofpage">';
$formexpensereport->selectExpensereportStatus($search_status, 'search_status', 1, 1);
print $formexpensereport->selectExpensereportStatus($search_status, 'search_status', 1, 1, 'search_status width100 onrightofpage');
print '</td>';
}
// Action column