Debug v13
This commit is contained in:
parent
030df716a2
commit
0361d3afde
@ -1250,12 +1250,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
//print "Remove box ".$file.'<br>';
|
||||
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);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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
|
||||
|
||||
@ -135,6 +135,7 @@ if (!function_exists('curl_version'))
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// Account Parameters
|
||||
@ -144,7 +145,7 @@ print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="titlefield">';
|
||||
print '<td>';
|
||||
print $langs->trans("PaypalLiveEnabled").'</td><td>';
|
||||
if (empty($conf->global->PAYPAL_API_SANDBOX))
|
||||
{
|
||||
@ -181,6 +182,15 @@ print $langs->trans("PAYPAL_SSLVERSION").'</td><td>';
|
||||
print $form->selectarray("PAYPAL_SSLVERSION", array('1'=> $langs->trans('TLSv1'), '6'=> $langs->trans('TLSv1.2')), $conf->global->PAYPAL_SSLVERSION);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// Usage Parameters
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("UsageParameter").'</td>';
|
||||
@ -211,6 +221,7 @@ if (!empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BankAccount").'</td><td>';
|
||||
print img_picto('', 'bank_account').' ';
|
||||
$form->select_comptes($conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -255,6 +266,14 @@ print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" va
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("UrlGenerationParameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
@ -284,6 +303,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
@ -296,7 +316,7 @@ print '<br><br>';
|
||||
// Help doc
|
||||
print '<u>'.$langs->trans("InformationToFindParameters", "Paypal").'</u>:<br>';
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
print '<a href="#" class="reposition" id="apidoca">'.$langs->trans("ClickHere").'...</a>';
|
||||
print '<a class="reposition" id="apidoca">'.$langs->trans("ClickHere").'...</a>';
|
||||
|
||||
$realpaypalurl = 'www.paypal.com';
|
||||
$sandboxpaypalurl = 'developer.paypal.com';
|
||||
@ -318,11 +338,13 @@ if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#apidoc").hide();
|
||||
$("#apidoca").click(function() {
|
||||
$("#apidoc").show();
|
||||
$("#apidoca").hide();
|
||||
})
|
||||
$("#apidoc").hide();
|
||||
$("#apidoca").click(function() {
|
||||
console.log("We click on apidoca show/hide");
|
||||
$("#apidoc").show();
|
||||
$("#apidoca").hide();
|
||||
return false;
|
||||
})
|
||||
});';
|
||||
print '</script>';
|
||||
}
|
||||
|
||||
@ -169,6 +169,7 @@ print '<span class="opacitymedium">'.$langs->trans("StripeDesc")."</span><br>\n"
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("AccountParameter").'</td>';
|
||||
@ -177,7 +178,7 @@ print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="titlefield">';
|
||||
print '<td>';
|
||||
print $langs->trans("StripeLiveEnabled").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STRIPE_LIVE');
|
||||
@ -209,9 +210,9 @@ if (empty($conf->stripeconnect->enabled))
|
||||
}
|
||||
print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_KEY" value="'.$conf->global->STRIPE_TEST_WEBHOOK_KEY.'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
|
||||
$out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' ';
|
||||
$out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForTestWebhook").'</span> ';
|
||||
$url = dol_buildpath('/public/stripe/ipn.php?test', 3);
|
||||
$out .= '<input type="text" id="onlinetestwebhookurl" class="minwidth500" value="'.$url.'">';
|
||||
$out .= '<input type="text" id="onlinetestwebhookurl" class="minwidth500" value="'.$url.'" disabled>';
|
||||
$out .= ajax_autoselect("onlinetestwebhookurl", 0);
|
||||
print '<br>'.$out;
|
||||
print '</td><td>';
|
||||
@ -278,9 +279,9 @@ if (empty($conf->stripeconnect->enabled))
|
||||
}
|
||||
print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_KEY" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_KEY.'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx</span>';
|
||||
$out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' ';
|
||||
$out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForLiveWebhook").'</span> ';
|
||||
$url = dol_buildpath('/public/stripe/ipn.php', 3);
|
||||
$out .= '<input type="text" id="onlinelivewebhookurl" class="minwidth500" value="'.$url.'">';
|
||||
$out .= '<input type="text" id="onlinelivewebhookurl" class="minwidth500" value="'.$url.'" disabled>';
|
||||
$out .= ajax_autoselect("onlinelivewebhookurl", 0);
|
||||
print '<br>'.$out;
|
||||
print '</td><td>';
|
||||
@ -321,13 +322,15 @@ if (empty($conf->stripeconnect->enabled))
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="titlefield">'.$langs->trans("UsageParameter").'</td>';
|
||||
print '<td>'.$langs->trans("UsageParameter").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -339,11 +342,12 @@ print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("StripeUserAccountForActions").'</td><td>';
|
||||
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 '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BankAccount").'</td><td>';
|
||||
print img_picto('', 'bank_account').' ';
|
||||
$form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -437,6 +441,19 @@ print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" va
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("UrlGenerationParameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Payment token for URL
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("SecurityToken").'</td><td>';
|
||||
@ -461,6 +478,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
@ -481,12 +499,14 @@ if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#apidoc").hide();
|
||||
$("#apidoca").click(function() {
|
||||
$("#apidoc").show();
|
||||
$("#apidoca").hide();
|
||||
});
|
||||
});';
|
||||
$("#apidoc").hide();
|
||||
$("#apidoca").click(function() {
|
||||
console.log("We click on apidoca show/hide");
|
||||
$("#apidoc").show();
|
||||
$("#apidoca").hide();
|
||||
return false;
|
||||
});
|
||||
});';
|
||||
print '</script>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user