FIX No need to ask doc template when only one is defined

This commit is contained in:
Laurent Destailleur 2016-04-01 11:12:49 +02:00
parent c340745b78
commit 9eb1925825

View File

@ -712,13 +712,16 @@ if ($action == 'create')
}
// Document model
print "<tr><td>".$langs->trans("Model")."</td>";
print '<td colspan="3">';
include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php';
$liste = ModelePdfExpedition::liste_modeles($db);
print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF);
print "</td></tr>\n";
if (count($liste) > 1)
{
print "<tr><td>".$langs->trans("Model")."</td>";
print '<td colspan="3">';
print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF);
print "</td></tr>\n";
}
print "</table>";
dol_fiche_end();