From 4398649af6b5ff956aa3e83634fc184f5166f5c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 01:46:59 +0100 Subject: [PATCH] Add hooks to add column in list of payment modes --- htdocs/modulebuilder/template/myobject_list.php | 1 + htdocs/societe/paymentmodes.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index eeabbb11b1e..6eb76ae0360 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -446,6 +446,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; +// Action column print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; print ''."\n"; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 0853b7ee571..3e72c33c142 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -832,6 +832,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''.$langs->trans('Default').''; print ''.$langs->trans('Note').''; print ''.$langs->trans('DateModification').''; + // Hook fields + $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>''); + $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print ""; print "\n"; @@ -917,6 +922,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); print ''; + // Fields from hook + $parameters=array('arrayfields'=>array(), 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print ''; if ($user->rights->societe->creer) {