This commit is contained in:
Laurent Destailleur 2022-12-04 11:45:34 +01:00
parent cabbfc19ac
commit 61bea8630e
2 changed files with 14 additions and 3 deletions

View File

@ -2297,7 +2297,7 @@ if ($action == 'create') {
}
}
$tredited = 'tredited';
$tredited = 'tredited'; // Case the addfile and linkto file is used for edit (used by following tpl)
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
@ -2455,6 +2455,7 @@ if ($action == 'create') {
print '</script>'."\n";
print '</td></tr>';
$tredited = ''; // Case the addfile and linkto file is used for edit (used by following tpl)
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';

View File

@ -136,8 +136,18 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
print '</td></tr>';
} else {
print '<tr class="oddeven nohover trattachnewfilenow"'.(!GETPOSTISSET('sendit') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>';
print '<td colspan="'.$colspan.'">';
if (empty($tredited)) {
$css = 'oddeven nohover trattachnewfilenow';
$newcolspan = $colspan;
} else {
$css = 'trattachnewfilenow tredited';
$newcolspan = $colspan - 1;
}
print '<tr class="'.$css.'"'.(!GETPOSTISSET('sendit') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>';
if (!empty($tredited)) {
print '<td></td>';
}
print '<td colspan="'.($newcolspan).'">';
print '<span class="opacitymedium">'.$langs->trans("NoFilesUploadedYet").'</span>';
print '</td></tr>';
}