After creating a new item from the dashboard edit-item create page, send the user to the edit item edit page

This commit is contained in:
Kevin MacMartin 2017-01-03 23:28:03 -05:00
parent 880a578454
commit 26bbfd557c

View file

@ -306,7 +306,12 @@ 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