FIX Bad value for token
This commit is contained in:
parent
6729ddbbb6
commit
805680ef53
@ -662,13 +662,14 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input =
|
|||||||
|
|
||||||
// Set constant
|
// Set constant
|
||||||
$("#set_'.$code.'_'.$object->id.'").click(function() {
|
$("#set_'.$code.'_'.$object->id.'").click(function() {
|
||||||
|
console.log("Click managed by ajax_object_onoff");
|
||||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
||||||
action: \'set\',
|
action: \'set\',
|
||||||
field: \''.$field.'\',
|
field: \''.$field.'\',
|
||||||
value: \'1\',
|
value: \'1\',
|
||||||
element: \''.$object->element.'\',
|
element: \''.$object->element.'\',
|
||||||
id: \''.$object->id.'\',
|
id: \''.$object->id.'\',
|
||||||
token: \''.newToken().'\'
|
token: \''.currentToken().'\'
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
$("#set_'.$code.'_'.$object->id.'").hide();
|
$("#set_'.$code.'_'.$object->id.'").hide();
|
||||||
@ -693,13 +694,14 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input =
|
|||||||
|
|
||||||
// Del constant
|
// Del constant
|
||||||
$("#del_'.$code.'_'.$object->id.'").click(function() {
|
$("#del_'.$code.'_'.$object->id.'").click(function() {
|
||||||
|
console.log("Click managed by ajax_object_onoff");
|
||||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
||||||
action: \'set\',
|
action: \'set\',
|
||||||
field: \''.$field.'\',
|
field: \''.$field.'\',
|
||||||
value: \'0\',
|
value: \'0\',
|
||||||
element: \''.$object->element.'\',
|
element: \''.$object->element.'\',
|
||||||
id: \''.$object->id.'\',
|
id: \''.$object->id.'\',
|
||||||
token: \''.newToken().'\'
|
token: \''.currentToken().'\'
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
$("#del_'.$code.'_'.$object->id.'").hide();
|
$("#del_'.$code.'_'.$object->id.'").hide();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user