Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 15.0

This commit is contained in:
Laurent Destailleur 2022-04-12 10:05:27 +02:00
commit 4da7883a9a
2 changed files with 7 additions and 2 deletions

View File

@ -48,6 +48,10 @@ if (!defined('NOIPCHECK')) {
if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', '1');
}
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
}
include '../../main.inc.php';
$action = GETPOST('action', 'aZ09');

View File

@ -193,7 +193,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
if ($action == 'refusepropal') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
}
// Check link validity for param 'source' to avoid use of the examples as value
@ -431,11 +431,12 @@ if ($action == "dosign" && empty($cancel)) {
"ref" : \''.dol_escape_js($REF).'\',
"securekey" : \''.dol_escape_js($SECUREKEY).'\',
"mode" : \''.dol_escape_htmltag($source).'\',
"entity" : \''.dol_escape_htmltag($entity).'\',
},
success: function(response) {
if(response == "success"){
console.log("Success on saving signature");
window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).'");
window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:'').'");
}else{
console.error(response);
}