diff --git a/static/js/app/users.js b/static/js/app/users.js index feb0e9ac..10f310f1 100644 --- a/static/js/app/users.js +++ b/static/js/app/users.js @@ -25,6 +25,7 @@ function save(idx){ successFlash("Group updated successfully!") load() dismiss() + $("#modal").modal('hide') }) .error(function(data){ modalError(data.responseJSON.message) @@ -37,6 +38,7 @@ function save(idx){ successFlash("Group added successfully!") load() dismiss() + $("#modal").modal('hide') }) .error(function(data){ modalError(data.responseJSON.message) @@ -48,7 +50,6 @@ function dismiss(){ $("#targetsTable").dataTable().DataTable().clear().draw() $("#name").val("") $("#modal\\.flashes").empty() - $("#modal").modal('hide') } function edit(idx){ @@ -176,4 +177,7 @@ $(document).ready(function(){ .remove() .draw(); }) + $("#modal").on("hide.bs.modal", function(){ + dismiss() + }) }) diff --git a/templates/users.html b/templates/users.html index 4ee56f64..da1b731e 100644 --- a/templates/users.html +++ b/templates/users.html @@ -107,7 +107,7 @@