diff --git a/core/templates/base.html b/core/templates/base.html
index 739cf1d..a3852db 100644
--- a/core/templates/base.html
+++ b/core/templates/base.html
@@ -22,11 +22,14 @@
+
+
+
diff --git a/courses/templates/topic/list_topic_foruns.html b/courses/templates/topic/list_topic_foruns.html
index 7bd6893..ef6a4ab 100644
--- a/courses/templates/topic/list_topic_foruns.html
+++ b/courses/templates/topic/list_topic_foruns.html
@@ -1,3 +1,3 @@
{% for forum in foruns %}
- {{ forum }}
+ {{ forum }}
{% endfor %}
\ No newline at end of file
diff --git a/forum/static/js/forum.js b/forum/static/js/forum.js
index 3116566..319b41a 100644
--- a/forum/static/js/forum.js
+++ b/forum/static/js/forum.js
@@ -39,7 +39,7 @@ function createForum(url, topic) {
console.log(data);
data = data.split('-');
- $('.foruns_list').append(""+data[2]+"
");
+ $('.foruns_list').append(""+data[2]+"
");
$("#createForum").modal('hide');
@@ -57,7 +57,6 @@ function createForum(url, topic) {
$("#createForum").modal();
}
-
/*
*
* Function to load forum to modal
@@ -93,6 +92,23 @@ function showForum(url, forum_id) {
$('#forumModal').modal();
}
+function delete_forum(url, forum, message) {
+ alertify.confirm(message, function(){
+ var csrftoken = getCookie('csrftoken');
+
+ $.ajax({
+ method: 'post',
+ beforeSend: function (request) {
+ request.setRequestHeader('X-CSRFToken', csrftoken);
+ },
+ url: url,
+ success: function(data) {
+ $("#forum_"+forum).remove();
+ $('#forumModal').modal('hide');
+ }
+ });
+ });
+}
/*
*
diff --git a/forum/templates/forum/forum_list.html b/forum/templates/forum/forum_list.html
index c829116..7968613 100644
--- a/forum/templates/forum/forum_list.html
+++ b/forum/templates/forum/forum_list.html
@@ -14,7 +14,7 @@