Skip to content
Snippets Groups Projects
Commit f64f0d69 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: If showempty is 0 and empty, do not show button.

parent 54f55cf0
Branches
Tags
No related merge requests found
......@@ -482,7 +482,7 @@ class FormFile
// Language code (if multilang)
$out.= '<th align="center" class="formdoc liste_titre">';
if (($allowgenifempty || (is_array($modellist) && count($modellist) > 0)) && $conf->global->MAIN_MULTILANGS && ! $forcenomultilang)
if (($allowgenifempty || (is_array($modellist) && count($modellist) > 0)) && $conf->global->MAIN_MULTILANGS && ! $forcenomultilang && (! empty($modellist) || $showempty))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$formadmin=new FormAdmin($this->db);
......@@ -508,6 +508,7 @@ class FormFile
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
}
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
if (empty($modellist) && ! $showempty) $genbutton='';
$out.= $genbutton;
$out.= '</th>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment