2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 11:40:58 +00:00

Modal for company create

- Ajax modals now return the URL of the item they are operating on
- passing {follow: true} to the modal caller will go to that URL on success
- footable'd company list
This commit is contained in:
Oliver
2018-04-27 21:58:22 +10:00
parent c4e305bde6
commit 36cf946a78
5 changed files with 52 additions and 23 deletions

View File

@ -129,12 +129,19 @@ function launchModalForm(modal, url, options = {}) {
$(modal).modal('hide');
// Form success callback
if (options.success) {
options.success();
}
// Follow the URL returned by the JSON response
else if (options.follow && response.url) {
window.location.href = response.url;
}
// Redirect to a specific URL
else if (options.redirect) {
window.location.href = options.redirect;
}
// Reload the current page
else if (options.reload) {
location.reload();
}