From 18ed4b528facf002e6630f6bae61e3fa2cf503be Mon Sep 17 00:00:00 2001 From: Timo Salola Date: Mon, 12 Sep 2016 12:20:42 +0000 Subject: [PATCH] Fix issue with deleting domain --- app/templates/domain_management.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/templates/domain_management.html b/app/templates/domain_management.html index 2ab66fa..03cd9b0 100644 --- a/app/templates/domain_management.html +++ b/app/templates/domain_management.html @@ -118,9 +118,10 @@ $(document.body).on('click', '.delete_domain', function() { var info = "Are you sure you want to delete " + domain + "?"; modal.find('.modal-body p').text(info); modal.find('#button_delete_confirm').click(function() { - $.get($SCRIPT_ROOT + '/admin/domain/' + domain + '/delete'); + $.get($SCRIPT_ROOT + '/admin/domain/' + domain + '/delete', function() { + window.location.href = '{{ url_for('dashboard') }}'; + }); modal.modal('hide'); - window.location.href = '{{ url_for('dashboard') }}'; }) modal.modal('show');