mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW add form confirm hook on company card
This commit is contained in:
parent
7b15197ded
commit
1017fad754
|
|
@ -2222,10 +2222,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), -1, 'company');
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
// Confirm delete third party
|
||||
if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)))
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete");
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete");
|
||||
}
|
||||
|
||||
if ($action == 'merge')
|
||||
|
|
@ -2239,9 +2241,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||
)
|
||||
);
|
||||
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 250);
|
||||
$formconfirm .= $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 250);
|
||||
}
|
||||
|
||||
// Call Hook formConfirm
|
||||
$parameters = array('formConfirm' => $formconfirm);
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
|
||||
elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user