mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 06:21:28 +01:00
Fix: If showempty is 0 and empty, do not show button.
This commit is contained in:
@@ -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>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user