Fix page redirect after changing an organisation name (slug) from the organisation info page (Fixes #9)

This commit is contained in:
2022-02-22 11:43:48 +00:00
parent 5f8e922438
commit e62e71ab6c
2 changed files with 17 additions and 4 deletions

View File

@@ -39,9 +39,13 @@ function attachOrganisationForm() {
// Set up the form for submission
form.ufForm({
validator: page.validators
}).on("submitSuccess.ufForm", function() {
}).on("submitSuccess.ufForm", function(e, data) {
// Reload page on success
window.location.reload();
if (data.redirect) {
window.location = data.redirect;
} else {
window.location.reload();
}
});
});
}