Fix: Pb into form output

This commit is contained in:
Laurent Destailleur 2013-06-16 20:08:45 +02:00
parent fee958eafb
commit 0690e8c39e
2 changed files with 12 additions and 9 deletions

View File

@ -201,13 +201,13 @@ class FormFile
// filedir = $conf->...->dir_ouput."/".get_exdir(id)
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// For backward compatibility
if (! empty($iconPDF)) {
return $this->getDocumentsLink($modulepart, $filename, $filedir);
}
$printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false;
$forname='builddoc';
$out='';
$var=true;
@ -441,15 +441,17 @@ class FormFile
// Button
$out.= '<th align="center" colspan="'.($delallowed?'2':'1').'" class="formdocbutton liste_titre">';
$out.= '<input class="button" id="'.$forname.'_generatebutton"';
$out.= ' type="submit" value="'.$buttonlabel.'"';
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $out.= ' disabled="disabled"';
$out.= '>';
$genbutton = '<input class="button" id="'.$forname.'_generatebutton"';
$genbutton.= ' type="submit" value="'.$buttonlabel.'"';
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $genbutton.= ' disabled="disabled"';
$genbutton.= '>';
if ($allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid')
{
$langs->load("errors");
$out.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
$langs->load("errors");
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
}
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
$out.= $genbutton;
$out.= '</th>';
if ($printer) $out.= '<th></th>';

View File

@ -1793,7 +1793,6 @@ else
}
print '</div>'."\n";
print '<br>';
if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC))
{
@ -1821,6 +1820,8 @@ else
print '<br>';
}
print '<div class="fichecenter"><br></div>';
// Subsidiaries list
$result=show_subsidiaries($conf,$langs,$db,$object);