thrimbletrimmer: Don't leave page after saving edits

pull/116/head
Mike Lang 5 years ago
parent 983e3a61c6
commit 728ede61c0

@ -135,10 +135,12 @@ thrimbletrimmerSubmit = function(state) {
error = response.statusText + ": " + text; error = response.statusText + ": " + text;
console.log(error); console.log(error);
alert(error); alert(error);
document.getElementById('SubmitButton').disabled = false; } else if (state == 'EDITED') {
} else { // Only return to dashboard if submitted, not for save draft
setTimeout(() => { window.location.href = '/thrimbletrimmer/dashboard.html'; }, 500); setTimeout(() => { window.location.href = '/thrimbletrimmer/dashboard.html'; }, 500);
return
} }
document.getElementById('SubmitButton').disabled = false;
})); }));
}; };

Loading…
Cancel
Save