Fix message shown to many times
This commit is contained in:
parent
80702e4c0a
commit
46eedeafe8
@ -73,7 +73,10 @@ if ($boxorder && $zone != '' && $userid > 0)
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
setEventMessages($langs->trans("BoxAdded"), null);
|
if (empty(GETPOST('closing')))
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("BoxAdded"), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1046,7 +1046,7 @@ class FormOther
|
|||||||
if (boxorder==\'A:A-B:B\' && closing == 1) // There is no more boxes on screen, and we are after a delete of a box so we must hide title
|
if (boxorder==\'A:A-B:B\' && closing == 1) // There is no more boxes on screen, and we are after a delete of a box so we must hide title
|
||||||
{
|
{
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.',
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?closing=\'+closing+\'&boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.',
|
||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
// We force reload to be sure to get all boxes into list
|
// We force reload to be sure to get all boxes into list
|
||||||
@ -1055,7 +1055,7 @@ class FormOther
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.',
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?closing=\'+closing+\'&boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.',
|
||||||
async: true
|
async: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user