diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 31405545dbb..c52b57e305f 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -916,6 +916,8 @@ if (empty($reshook)) { } } + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to build doc $upload_dir = $conf->contrat->multidir_output[$object->entity]; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 7f141d684b7..e30f35758d1 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -442,7 +442,8 @@ class FormFile } $printer = 0; - if (in_array($modulepart, array('facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket'))) { // The direct print feature is implemented only for such elements + // The direct print feature is implemented only for such elements + if (in_array($modulepart, array('contract', 'facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket'))) { $printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled)) ?true:false; } @@ -944,7 +945,7 @@ class FormFile $out .= '">'.img_picto($langs->trans("Delete"), 'delete').''; } if ($printer) { - $out .= ''.img_picto($langs->trans("PrintFile", $relativepath), 'printer.png').''; }