From d2275a0bbd77e45b818e2f3f7896927367e8aa11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Feb 2013 20:26:01 +0100 Subject: [PATCH] New: Add param to show title --- htdocs/core/class/html.formactions.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 76e8fbc0f68..514ffb6eab5 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -135,9 +135,10 @@ class FormActions * @param Object $object Object * @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter' * @param int $socid socid of user + * @param int $forceshowtitle Show title even if there is no actions to show * @return int <0 if KO, >=0 if OK */ - function showactions($object,$typeelement,$socid=0) + function showactions($object,$typeelement,$socid=0,$forceshowtitle=0) { global $langs,$conf,$user; global $bc; @@ -148,7 +149,7 @@ class FormActions if (! is_array($listofactions)) dol_print_error($this->db,'FailedToGetActions'); $num = count($listofactions); - if ($num) + if ($num || $forceshowtitle) { if ($typeelement == 'invoice') $title=$langs->trans('ActionsOnBill'); elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title=$langs->trans('ActionsOnBill');