mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Update ajax.lib.php
This commit is contained in:
parent
830ec9c9cb
commit
dd5ea670e2
|
|
@ -469,7 +469,6 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0,
|
|||
*/
|
||||
function ajax_object_onoff($object, $code, $input=array())
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
global $conf, $langs, $db;
|
||||
|
||||
$out= '<script type="text/javascript">
|
||||
|
|
@ -478,7 +477,7 @@ function ajax_object_onoff($object, $code, $input=array())
|
|||
|
||||
// Set constant
|
||||
$("#set_'.$code.'_'.$object->id.'").click(function() {
|
||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/productonoff.php", {
|
||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
||||
action: \'set'.$code.'\',
|
||||
value: \'1\',
|
||||
id: \''.$object->id.'\'
|
||||
|
|
@ -506,7 +505,7 @@ function ajax_object_onoff($object, $code, $input=array())
|
|||
|
||||
// Del constant
|
||||
$("#del_'.$code.'_'.$object->id.'").click(function() {
|
||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/productonoff.php", {
|
||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
||||
action: \'set'.$code.'\',
|
||||
value: \'0\',
|
||||
id: \''.$object->id.'\'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user