From f220b7a8811dbc3563306684931f4e39840b5a34 Mon Sep 17 00:00:00 2001 From: Zambom Date: Tue, 4 Oct 2016 23:21:40 -0300 Subject: [PATCH] Adapting forum deletion [Issue: #86 and #96] --- forum/static/js/forum.js | 7 ++++--- forum/templates/forum/forum_view.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/forum/static/js/forum.js b/forum/static/js/forum.js index 2d5515a..d0f07e2 100644 --- a/forum/static/js/forum.js +++ b/forum/static/js/forum.js @@ -92,7 +92,7 @@ function createForum(url, topic) { * Function to delete a forum * */ -function delete_forum(url, forum, message) { +function delete_forum(url, forum, message, return_url) { alertify.confirm(message, function(){ var csrftoken = getCookie('csrftoken'); @@ -103,8 +103,9 @@ function delete_forum(url, forum, message) { }, url: url, success: function(data) { - $("#forum_"+forum).remove(); - $('#forumModal').modal('hide'); + alertify.alert('Amadeus', data, function(){ + window.location.href = return_url; + }); } }); }); diff --git a/forum/templates/forum/forum_view.html b/forum/templates/forum/forum_view.html index d41245f..0df7a45 100644 --- a/forum/templates/forum/forum_view.html +++ b/forum/templates/forum/forum_view.html @@ -42,7 +42,7 @@
-- libgit2 0.21.2