mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-09 11:16:39 -05:00
Go back to the dashboard page once a new item has been created
This commit is contained in:
parent
3cadd8b957
commit
8678e98709
1 changed files with 1 additions and 6 deletions
|
@ -339,12 +339,7 @@ function editItemInit() {
|
||||||
// functionality to run on success
|
// functionality to run on success
|
||||||
const returnSuccess = function() {
|
const returnSuccess = function() {
|
||||||
hideLoadingModal();
|
hideLoadingModal();
|
||||||
|
|
||||||
if (operation === "create") {
|
|
||||||
window.location.href = "/" + location.href.replace(/^[^:]*:\/\/[^\/]*\//, "").replace(/\/[^/]*$/, "") + "/" + row_id;
|
|
||||||
} else {
|
|
||||||
window.location.href = "/dashboard/" + model;
|
window.location.href = "/dashboard/" + model;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// add the image from the image upload box for image-upload class elements
|
// add the image from the image upload box for image-upload class elements
|
||||||
|
|
Loading…
Reference in a new issue