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

View File

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