Added flow if window closing fails

If the window could not be closed, the normal flow continues
Added comments
This commit is contained in:
Marc Ole Bulling 2019-10-15 08:20:05 +02:00 committed by GitHub
parent 81ec1ae39e
commit bc0035ebc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,11 +67,14 @@
} }
else else
{ {
/* If the GET parameter "closeAfterCreation" was passed to the form, it will
automatically close after creating the product. This only works if the window
was opened with javascript */
if (window.location.href.includes("closeAfterCreation")) if (window.location.href.includes("closeAfterCreation"))
{ {
window.close(); window.close();
} }
else if (redirectDestination == "reload") if (redirectDestination == "reload")
{ {
window.location.reload(); window.location.reload();
} }