Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
59f749a65f
@ -205,6 +205,8 @@ with
|
||||
with
|
||||
foreach ($value[1] as $k => $v) {
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
@ -233,11 +235,13 @@ JCROP:
|
||||
* Remove analytics tag into file index.html
|
||||
|
||||
|
||||
|
||||
JQUERYFILETREE:
|
||||
---------------
|
||||
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
|
||||
|
||||
|
||||
|
||||
RESTLER:
|
||||
--------
|
||||
|
||||
|
||||
@ -61,6 +61,13 @@ if (preg_match('/\/explorer\/swagger\.json/', $_SERVER["PHP_SELF"])) {
|
||||
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
|
||||
header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY');
|
||||
}
|
||||
// When we request url to get an API, we accept Cross site so we can make js API call inside another website
|
||||
if (preg_match('/\/api\/index\.php/', $_SERVER["PHP_SELF"])) {
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
|
||||
header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY');
|
||||
}
|
||||
|
||||
|
||||
$res = 0;
|
||||
if (!$res && file_exists("../main.inc.php")) {
|
||||
@ -304,7 +311,7 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' &&
|
||||
|
||||
foreach ($listofendpoints as $endpointrule) {
|
||||
$tmparray = explode(':', $endpointrule);
|
||||
if ($classfile == $tmparray[0] && $tmparray[1] == 1) {
|
||||
if (($classfile == $tmparray[0] || $classfile.'api' == $tmparray[0]) && $tmparray[1] == 1) {
|
||||
$endpointisallowed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1132,18 +1132,16 @@ if ($action == 'create') {
|
||||
// Ligne info remises tiers
|
||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td>';
|
||||
if ($soc->remise_percent) {
|
||||
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
|
||||
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent).' ';
|
||||
} else {
|
||||
print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("CompanyHasNoRelativeDiscount").'. </span>';
|
||||
}
|
||||
print '. ';
|
||||
$absolute_discount = $soc->getAvailableDiscounts();
|
||||
if ($absolute_discount) {
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency));
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)).'.';
|
||||
} else {
|
||||
print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("CompanyHasNoAbsoluteDiscount").'.</span>';
|
||||
}
|
||||
print '.';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1370,18 +1368,16 @@ if ($action == 'create') {
|
||||
// Line info of thirdparty discounts
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Discount').'</td><td colspan="3">';
|
||||
if ($object->thirdparty->remise_percent) {
|
||||
print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent);
|
||||
print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent).'. ';
|
||||
} else {
|
||||
print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("CompanyHasNoRelativeDiscount").'. </span>';
|
||||
}
|
||||
$absolute_discount = $object->thirdparty->getAvailableDiscounts();
|
||||
print '. ';
|
||||
if ($absolute_discount) {
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency));
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)).'.';
|
||||
} else {
|
||||
print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("CompanyHasNoAbsoluteDiscount").'.</span>';
|
||||
}
|
||||
print '.';
|
||||
print '</td></tr>';
|
||||
|
||||
// Date
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
if(window.SwaggerTranslator) {
|
||||
window.SwaggerTranslator.translate();
|
||||
}
|
||||
|
||||
|
||||
addApiKeyAuthorization();
|
||||
},
|
||||
onFailure: function(data) {
|
||||
@ -83,7 +83,9 @@
|
||||
showRequestHeaders: false,
|
||||
showOperationIds: false,
|
||||
displayOperationIds: false,
|
||||
displayRequestDuration: true
|
||||
displayRequestDuration: true,
|
||||
/* @CHANGE LDR Add validatorUrl */
|
||||
validatorUrl: null
|
||||
});
|
||||
|
||||
function addApiKeyAuthorization(){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user