mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 13:26:14 +02:00
Fixed product edit page returnto handling
This commit is contained in:
parent
c00411da81
commit
1fbda392c2
|
|
@ -22,7 +22,15 @@
|
||||||
}
|
}
|
||||||
else if (returnTo !== undefined)
|
else if (returnTo !== undefined)
|
||||||
{
|
{
|
||||||
window.location.href = U(returnTo) + '&product-name=' + encodeURIComponent($('#name').val());
|
if (GetUriParam("flow") !== undefined)
|
||||||
|
{
|
||||||
|
window.location.href = U(returnTo) + '&product-name=' + encodeURIComponent($('#name').val());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window.location.href = U(returnTo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -52,7 +60,14 @@
|
||||||
}
|
}
|
||||||
else if (returnTo !== undefined)
|
else if (returnTo !== undefined)
|
||||||
{
|
{
|
||||||
window.location.href = U(returnTo) + '&product-name=' + encodeURIComponent($('#name').val());
|
if (GetUriParam("flow") !== undefined)
|
||||||
|
{
|
||||||
|
window.location.href = U(returnTo) + '&product-name=' + encodeURIComponent($('#name').val());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window.location.href = U(returnTo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -147,7 +162,7 @@ if (GetUriParam("flow") == "InplaceNewProductWithName")
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetUriParam("flow") !== undefined)
|
if (GetUriParam("flow") !== undefined || GetUriParam("returnto") !== undefined)
|
||||||
{
|
{
|
||||||
$("#save-hint").addClass("d-none");
|
$("#save-hint").addClass("d-none");
|
||||||
$(".save-product-button[data-location='return']").addClass("d-none");
|
$(".save-product-button[data-location='return']").addClass("d-none");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user