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 committed 2018-04-27 21:58:22 +10:00
1 parent c4e305bde6
commit 36cf946a78
5 files changed
+52 -23

No files matched your search

+7
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();
}