2
0
forked from Wavyzz/dolibarr

FIX use var "saved_url" instead global var "$url"

This commit is contained in:
Regis Houssin
2021-02-23 16:56:45 +01:00
parent ec5d9983e0
commit 0a3d1ab92e

View File

@@ -530,7 +530,7 @@ function hideMessage(fieldId,message) {
* @param string token Token * @param string token Token
*/ */
function setConstant(url, code, input, entity, strict, forcereload, userid, token) { function setConstant(url, code, input, entity, strict, forcereload, userid, token) {
var $url = url; /* avoid undefined url */ var saved_url = url; /* avoid undefined url */
$.post( url, { $.post( url, {
action: "set", action: "set",
name: code, name: code,
@@ -575,7 +575,7 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke
$.each(data, function(key, value) { $.each(data, function(key, value) {
$("#set_" + key).hide(); $("#set_" + key).hide();
$("#del_" + key).show(); $("#del_" + key).show();
$.post( url, { $.post( saved_url, {
action: "set", action: "set",
name: key, name: key,
value: value, value: value,
@@ -605,7 +605,7 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke
* @param string token Token * @param string token Token
*/ */
function delConstant(url, code, input, entity, strict, forcereload, userid, token) { function delConstant(url, code, input, entity, strict, forcereload, userid, token) {
var $url = url; /* avoid undefined url */ var saved_url = url; /* avoid undefined url */
$.post( url, { $.post( url, {
action: "del", action: "del",
name: code, name: code,
@@ -647,7 +647,7 @@ function delConstant(url, code, input, entity, strict, forcereload, userid, toke
$.each(data, function(key, value) { $.each(data, function(key, value) {
$("#del_" + value).hide(); $("#del_" + value).hide();
$("#set_" + value).show(); $("#set_" + value).show();
$.post( url, { $.post( saved_url, {
action: "del", action: "del",
name: value, name: value,
entity: entity, entity: entity,