Merge pull request #19302 from FHenry/dev_addhook_dolbanner
NEW: for developpers add hook for moreHTMLRef in dol_banner_tab
This commit is contained in:
commit
e430fe5f94
@ -229,7 +229,8 @@ class HookManager
|
|||||||
'showLinkToObjectBlock',
|
'showLinkToObjectBlock',
|
||||||
'setContentSecurityPolicy',
|
'setContentSecurityPolicy',
|
||||||
'setHtmlTitle',
|
'setHtmlTitle',
|
||||||
'completeTabsHead'
|
'completeTabsHead',
|
||||||
|
'formDolBanner'
|
||||||
)
|
)
|
||||||
)) {
|
)) {
|
||||||
$hooktype = 'addreplace';
|
$hooktype = 'addreplace';
|
||||||
|
|||||||
@ -1845,7 +1845,7 @@ function dol_get_fiche_end($notab = 0)
|
|||||||
*/
|
*/
|
||||||
function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '')
|
function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '')
|
||||||
{
|
{
|
||||||
global $conf, $form, $user, $langs;
|
global $conf, $form, $user, $langs, $hookmanager;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -2116,6 +2116,17 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parameters=array('morehtmlref'=>$morehtmlref);
|
||||||
|
$reshook = $hookmanager->executeHooks('formDolBanner', $parameters, $object, $action);
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
} elseif (empty($reshook)) {
|
||||||
|
$morehtmlref .= $hookmanager->resPrint;
|
||||||
|
} elseif ($reshook > 0) {
|
||||||
|
$morehtmlref = $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<div class="'.($onlybanner ? 'arearefnobottom ' : 'arearef ').'heightref valignmiddle centpercent">';
|
print '<div class="'.($onlybanner ? 'arearefnobottom ' : 'arearef ').'heightref valignmiddle centpercent">';
|
||||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
|
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user