diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 794cfd0cef4..510ec8ef55a 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -1250,12 +1250,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
//print "Remove box ".$file.'
';
if ($file == 'box_graph_product_distribution.php') {
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
- dol_syslog("We discard disabling of module ".$file." because another module still active require it.");
+ dol_syslog("We discard deleting module ".$file." because another module still active requires it.");
continue;
}
}
- if (empty($file)) { $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility
+ if (empty($file)) {
+ $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility
}
if ($this->db->type == 'sqlite3') {
@@ -1284,7 +1285,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
$sql .= " WHERE file = '".$this->db->escape($file)."'";
- $sql .= " AND entity = ".$conf->entity;
+ $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company
dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG);
$resql = $this->db->query($sql);
diff --git a/htdocs/core/modules/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php
index 0a3d9ccd11b..e6ac76f0178 100644
--- a/htdocs/core/modules/modBookmark.class.php
+++ b/htdocs/core/modules/modBookmark.class.php
@@ -69,7 +69,9 @@ class modBookmark extends DolibarrModules
$this->const = array();
// Boxes
- $this->boxes = array(0=>array('file'=>'box_bookmarks.php', 'enabledbydefaulton'=>'Home'));
+ $this->boxes = array(
+ 0=>array('file'=>'box_bookmarks.php', 'enabledbydefaulton'=>'Home')
+ );
// Permissions
$this->rights = array();
diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php
index a70593a5e1e..bb6c36b353c 100644
--- a/htdocs/core/modules/modCategorie.class.php
+++ b/htdocs/core/modules/modCategorie.class.php
@@ -386,10 +386,10 @@ class modCategorie extends DolibarrModules
)
);
$typeexample = "";
- if ($conf->product->enabled) { $typeexample .= ($typeexample ? "/" : "")."0=Product"; }
+ if (!empty($conf->product->enabled)) { $typeexample .= ($typeexample ? "/" : "")."0=Product"; }
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $typeexample .= ($typeexample ? "/" : "")."1=Supplier"; }
- if ($conf->societe->enabled) { $typeexample .= ($typeexample ? "/" : "")."2=Customer-Prospect"; }
- if ($conf->adherent->enabled) { $typeexample .= ($typeexample ? "/" : "")."3=Member"; }
+ if (!empty($conf->societe->enabled)) { $typeexample .= ($typeexample ? "/" : "")."2=Customer-Prospect"; }
+ if (!empty($conf->adherent->enabled)) { $typeexample .= ($typeexample ? "/" : "")."3=Member"; }
$this->import_examplevalues_array[$r] = array(
'ca.label'=>"Supplier Category", 'ca.type'=>$typeexample, 'ca.description'=>"My Category description",
'ca.fk_parent' => '0'
diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php
index af6398c7a6d..42513a5b9f2 100644
--- a/htdocs/core/modules/modProjet.class.php
+++ b/htdocs/core/modules/modProjet.class.php
@@ -138,14 +138,11 @@ class modProjet extends DolibarrModules
$r++;
// Boxes
- $this->boxes = array();
- $r = 0;
- $this->boxes[$r][1] = "box_project.php";
- $r++;
- $this->boxes[$r][1] = "box_task.php";
- $r++;
- $this->boxes[$r][1] = "box_validated_projects.php";
- $r++;
+ $this->boxes = array(
+ 0=>array('file'=>'box_project.php', 'enabledbydefaulton'=>'Home'),
+ 1=>array('file'=>'box_task.php', 'enabledbydefaulton'=>'Home'),
+ 2=>array('file'=>'box_validated_projects.php', 'enabledbydefaulton'=>'Home'),
+ );
// Permissions
$this->rights = array();
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index c8bbc50e490..9c82306b641 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -122,20 +122,14 @@ class modSociete extends DolibarrModules
$r++;
// Boxes
- $this->boxes = array();
- $r = 0;
- $this->boxes[$r][1] = "box_clients.php";
- $r++;
- $this->boxes[$r][1] = "box_prospect.php";
- $r++;
- $this->boxes[$r][1] = "box_contacts.php";
- $r++;
- $this->boxes[$r][1] = "box_activity.php";
- $this->boxes[$r][2] = '(WarningUsingThisBoxSlowDown)';
- $r++;
- $this->boxes[$r][1] = "box_goodcustomers.php";
- $this->boxes[$r][2] = '(WarningUsingThisBoxSlowDown)';
- $r++;
+ $this->boxes = array(
+ 0=>array('file'=>'box_clients.php', 'enabledbydefaulton'=>'Home'),
+ 1=>array('file'=>'box_prospect.php', 'enabledbydefaulton'=>'Home'),
+ 2=>array('file'=>'box_contacts.php', 'enabledbydefaulton'=>'Home'),
+ 3=>array('file'=>'box_activity.php', 'enabledbydefaulton'=>'Home', 'note'=>'(WarningUsingThisBoxSlowDown)'),
+ 4=>array('file'=>'box_goodcustomers.php', 'enabledbydefaulton'=>'Home', 'note'=>'(WarningUsingThisBoxSlowDown)'),
+ );
+
// Permissions
$this->rights = array();
$this->rights_class = 'societe';
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index d19327bcea7..def2a7f7e69 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -139,15 +139,10 @@ class modTicket extends DolibarrModules
// Boxes
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
- $this->boxes = array(); // Boxes list
- $r = 0;
- // Example:
-
- $this->boxes[$r][1] = "box_last_ticket";
- $r++;
-
- $this->boxes[$r][1] = "box_last_modified_ticket";
- $r++;
+ $this->boxes = array(
+ 0=>array('file'=>'box_last_ticket.php', 'enabledbydefaulton'=>'Home'),
+ 1=>array('file'=>'box_last_modified_ticket.php', 'enabledbydefaulton'=>'Home')
+ ); // Boxes list
// Permissions
$this->rights = array(); // Permission array used by this module
diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php
index 04ee6dbe228..5ab913f7ce9 100644
--- a/htdocs/paypal/admin/paypal.php
+++ b/htdocs/paypal/admin/paypal.php
@@ -135,6 +135,7 @@ if (!function_exists('curl_version'))
print '
';
+print '
';
print '
';
// Account Parameters
@@ -144,7 +145,7 @@ print '| '.$langs->trans("Value").' | ';
print "\n";
print '';
-print '| ';
+print ' | ';
print $langs->trans("PaypalLiveEnabled").' | ';
if (empty($conf->global->PAYPAL_API_SANDBOX))
{
@@ -181,6 +182,15 @@ print $langs->trans("PAYPAL_SSLVERSION").' | ';
print $form->selectarray("PAYPAL_SSLVERSION", array('1'=> $langs->trans('TLSv1'), '6'=> $langs->trans('TLSv1.2')), $conf->global->PAYPAL_SSLVERSION);
print ' |
';
+print '
';
+print '
';
+
+print '
';
+
+
+print '';
+print '
';
+
// Usage Parameters
print '';
print '| '.$langs->trans("UsageParameter").' | ';
@@ -211,6 +221,7 @@ if (!empty($conf->banque->enabled))
{
print '
| ';
print $langs->trans("BankAccount").' | ';
+ print img_picto('', 'bank_account').' ';
$form->select_comptes($conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
print ' |
';
}
@@ -255,6 +266,14 @@ print ''.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>';
print '';
+print '
';
+print '
';
+
+print '
';
+
+print '';
+print '
';
+
print '';
print '| '.$langs->trans("UrlGenerationParameters").' | ';
print ''.$langs->trans("Value").' | ';
@@ -284,6 +303,7 @@ if ($conf->use_javascript_ajax) {
print '
';
print '
';
+print '
';
print dol_get_fiche_end();
@@ -296,7 +316,7 @@ print '
';
// Help doc
print ''.$langs->trans("InformationToFindParameters", "Paypal").':
';
if (!empty($conf->use_javascript_ajax))
- print ''.$langs->trans("ClickHere").'...';
+ print ''.$langs->trans("ClickHere").'...';
$realpaypalurl = 'www.paypal.com';
$sandboxpaypalurl = 'developer.paypal.com';
@@ -318,11 +338,13 @@ if (!empty($conf->use_javascript_ajax))
{
print "\n".'';
}
diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php
index 26d540e4093..c304a00ce3f 100644
--- a/htdocs/stripe/admin/stripe.php
+++ b/htdocs/stripe/admin/stripe.php
@@ -169,6 +169,7 @@ print ''.$langs->trans("StripeDesc")."
\n"
print '
';
+print '';
print '
';
print '';
print '| '.$langs->trans("AccountParameter").' | ';
@@ -177,7 +178,7 @@ print ' | ';
print "
\n";
print '';
-print '| ';
+print ' | ';
print $langs->trans("StripeLiveEnabled").' | ';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('STRIPE_LIVE');
@@ -209,9 +210,9 @@ if (empty($conf->stripeconnect->enabled))
}
print '';
print ' '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx';
- $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' ';
+ $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' ';
$url = dol_buildpath('/public/stripe/ipn.php?test', 3);
- $out .= '';
+ $out .= '';
$out .= ajax_autoselect("onlinetestwebhookurl", 0);
print ' '.$out;
print ' | ';
@@ -278,9 +279,9 @@ if (empty($conf->stripeconnect->enabled))
}
print '';
print ' '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx';
- $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' ';
+ $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' ';
$url = dol_buildpath('/public/stripe/ipn.php', 3);
- $out .= '';
+ $out .= '';
$out .= ajax_autoselect("onlinelivewebhookurl", 0);
print ' '.$out;
print ' | ';
@@ -321,13 +322,15 @@ if (empty($conf->stripeconnect->enabled))
print ' |
';
+print '
';
print '
';
+print '';
print '
';
print '';
-print '| '.$langs->trans("UsageParameter").' | ';
+print ''.$langs->trans("UsageParameter").' | ';
print ''.$langs->trans("Value").' | ';
print "
\n";
@@ -339,11 +342,12 @@ print '';
print '| ';
print $langs->trans("StripeUserAccountForActions").' | ';
-print $form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
+print img_picto('', 'user').$form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
print ' |
';
print '| ';
print $langs->trans("BankAccount").' | ';
+print img_picto('', 'bank_account').' ';
$form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
print ' |
';
@@ -437,6 +441,19 @@ print ''.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>';
print '';
+print '
';
+print '
';
+
+print '
';
+
+print '';
+print '
';
+
+print '';
+print '| '.$langs->trans("UrlGenerationParameters").' | ';
+print ''.$langs->trans("Value").' | ';
+print "
\n";
+
// Payment token for URL
print '| ';
print $langs->trans("SecurityToken").' | ';
@@ -461,6 +478,7 @@ if ($conf->use_javascript_ajax) {
print ' |
';
print '
';
+print '
';
print dol_get_fiche_end();
@@ -481,12 +499,14 @@ if (!empty($conf->use_javascript_ajax))
{
print "\n".'';
}