mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Fixed product edit page returnto handling
This commit is contained in:
@@ -21,10 +21,18 @@
|
||||
window.close();
|
||||
}
|
||||
else if (returnTo !== undefined)
|
||||
{
|
||||
if (GetUriParam("flow") !== undefined)
|
||||
{
|
||||
window.location.href = U(returnTo) + '&product-name=' + encodeURIComponent($('#name').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href = U(returnTo);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href = U(location + productId);
|
||||
}
|
||||
@@ -51,10 +59,17 @@
|
||||
window.close();
|
||||
}
|
||||
else if (returnTo !== undefined)
|
||||
{
|
||||
if (GetUriParam("flow") !== undefined)
|
||||
{
|
||||
window.location.href = U(returnTo) + '&product-name=' + encodeURIComponent($('#name').val());
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href = U(returnTo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.href = U(location + productId);
|
||||
}
|
||||
@@ -147,7 +162,7 @@ if (GetUriParam("flow") == "InplaceNewProductWithName")
|
||||
$('#name').focus();
|
||||
}
|
||||
|
||||
if (GetUriParam("flow") !== undefined)
|
||||
if (GetUriParam("flow") !== undefined || GetUriParam("returnto") !== undefined)
|
||||
{
|
||||
$("#save-hint").addClass("d-none");
|
||||
$(".save-product-button[data-location='return']").addClass("d-none");
|
||||
|
Reference in New Issue
Block a user