Fix: Online signature of proposals does not work well with multicompany
This commit is contained in:
parent
71516ecd3e
commit
9547b9e7fe
@ -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');
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user