diff --git a/sde_indexing_helper/static/js/delta_url_list.js b/sde_indexing_helper/static/js/delta_url_list.js index e34a940f..494a80f5 100644 --- a/sde_indexing_helper/static/js/delta_url_list.js +++ b/sde_indexing_helper/static/js/delta_url_list.js @@ -2071,8 +2071,26 @@ function postWorkflowStatus(collection_id, workflow_status) { "X-CSRFToken": csrftoken, }, success: function (data) { + $('#workflowStatusChangeModal button').blur(); + $("#workflowStatusChangeModal") + .removeClass('show') + .removeAttr('aria-hidden') + .modal('hide'); + $('.modal-backdrop').remove(); + $('body').removeClass('modal-open'); toastr.success("Workflow Status Updated!"); + + // Refresh page after modal closes and success message shows + setTimeout(function() { + window.location = window.location.href; + }, 1500); }, + error: function(xhr, status, error) { + $('#workflowStatusChangeModal button').blur(); + $("#workflowStatusChangeModal").modal('hide'); + $('.modal-backdrop').remove(); + toastr.error("Error updating workflow status: " + error); + } }); }