diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index d33f8546f8a..0d2e3163be6 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -207,7 +207,7 @@ class FormFile
return $this->getDocumentsLink($modulepart, $filename, $filedir);
}
$printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false;
-
+ $hookmanager->initHooks(array('formfile'));
$forname='builddoc';
$out='';
$var=true;
@@ -450,14 +450,18 @@ class FormFile
$langs->load("errors");
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
}
-
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
-
$out.= $genbutton;
$out.= '';
if ($printer) $out.= '
| ';
-
+ if($hookmanager->hooks['formfile'])
+ {
+ foreach($hookmanager->hooks['formfile'] as $module)
+ {
+ if(method_exists($module, 'formBuilddocLineOptions')) $out .= ' | ';
+ }
+ }
$out.= '';
// Execute hooks
@@ -529,6 +533,7 @@ class FormFile
$out.= ($param?'&'.$param:'');
$out.= '">'.img_printer().'';
}
+ if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocLineOptions',$parameters,$file);
}
$out.= '';
diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php
index c55574d363a..0871aaf71e0 100644
--- a/htdocs/paybox/admin/paybox.php
+++ b/htdocs/paybox/admin/paybox.php
@@ -61,8 +61,8 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
- $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
- if (! $result > 0) $error++;
+ $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
+ if (! $result > 0) $error++;
if (! $error)
{
@@ -93,12 +93,12 @@ llxHeader();
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("PayBoxSetup"),$linkback,'setup');
-$h = 0;
-$head = array();
-
-$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php";
-$head[$h][1] = $langs->trans("Account");
-$head[$h][2] = 'payboxaccount';
+$h = 0;
+$head = array();
+
+$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php";
+$head[$h][1] = $langs->trans("Account");
+$head[$h][2] = 'payboxaccount';
$h++;
dol_fiche_head($head, 'payboxaccount', '');
@@ -198,17 +198,17 @@ $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,''
$doleditor->Create();
print '';
-$var=!$var;
-print '| ';
-print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").' | ';
-print '';
-print ' '.$langs->trans("Example").': myemail@myserver.com';
-print ' |
';
+$var=!$var;
+print '| ';
+print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").' | ';
+print '';
+print ' '.$langs->trans("Example").': myemail@myserver.com';
+print ' |
';
print '
|
';
print '';
-dol_fiche_end();
+dol_fiche_end();
print '
';
diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php
index 998f724dc68..c91e2ff0c80 100644
--- a/htdocs/paypal/admin/paypal.php
+++ b/htdocs/paypal/admin/paypal.php
@@ -67,8 +67,8 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYPAL_MESSAGE_KO",GETPOST('PAYPAL_MESSAGE_KO'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
- $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
- if (! $result > 0) $error++;
+ $result=dolibarr_set_const($db, "PAYPAL_PAYONLINE_SENDEMAIL",GETPOST('PAYPAL_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
+ if (! $result > 0) $error++;
if (! $error)
{
@@ -203,12 +203,12 @@ $doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,''
$doleditor->Create();
print '';
-$var=!$var;
-print '| ';
-print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").' | ';
+$var=!$var;
+print ' |
| ';
+print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").' | ';
print '';
print ' '.$langs->trans("Example").': myemail@myserver.com';
-print ' |
';
+print '';
$var=true;
print '';