From 01ea4c28cff6efe403c310ad5718fb03f70965c7 Mon Sep 17 00:00:00 2001 From: Joa Date: Fri, 3 May 2019 11:02:37 +0200 Subject: [PATCH] adding hooks loading for form customization to card.php of adherents module --- htdocs/adherents/card.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 5d57208eb0e..850537356ee 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1059,6 +1059,13 @@ else // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + //Hooks here + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + //print $hookmanager->resPrint; //it double prints? + if (empty($reshook)) + { + print $object->showOptionals($extrafields, 'edit'); + } print ''; print "\n"; @@ -1357,9 +1364,15 @@ else // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; - + //Hooks here + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + //print $hookmanager->resPrint; //it double prints? + if (empty($reshook)) + { + print $object->showOptionals($extrafields, 'edit'); + } + print ''; - dol_fiche_end(); print '
';