Commit 8952483e82e1e98163cbd6c57d943b113342d3e8
1 parent
bd11ac45
Exists in
master
and in
5 other branches
Fixing forum creation bug
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
courses/templates/subject/form_view_teacher.html
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | </div><!--column--> | 39 | </div><!--column--> |
40 | </div><!--row--> | 40 | </div><!--row--> |
41 | </div> | 41 | </div> |
42 | - <div class="panel-collapse collapseTopic-{{topic.slug}} collapse in" role="tabpanel" aria-labelledby="heading_{{topic.id}}" aria-expanded="true" aria-hidden="false"> | 42 | + <div class="panel-collapse collapseTopic-{{topic.slug}} topic_{{ topic.id }} collapse in" role="tabpanel" aria-labelledby="heading_{{topic.id}}" aria-expanded="true" aria-hidden="false"> |
43 | <div class="panel-body"> | 43 | <div class="panel-body"> |
44 | <div class="presentation" id="presentation_{{topic.slug}}"> | 44 | <div class="presentation" id="presentation_{{topic.slug}}"> |
45 | <p> | 45 | <p> |
@@ -86,7 +86,7 @@ | @@ -86,7 +86,7 @@ | ||
86 | </div> | 86 | </div> |
87 | </div> | 87 | </div> |
88 | </div><!--EndPresentation--> | 88 | </div><!--EndPresentation--> |
89 | - <div class="editation" id="editation_{{topic.slug}}"> | 89 | + <div class="editation topic_{{ topic.id }}" id="editation_{{topic.slug}}"> |
90 | <div class="form-group"> | 90 | <div class="form-group"> |
91 | <label class="control-label" for="focusedInput2">{% trans 'Name Topic' %}</label> | 91 | <label class="control-label" for="focusedInput2">{% trans 'Name Topic' %}</label> |
92 | <input type="text" class="form-control" value="{{topic}}"> | 92 | <input type="text" class="form-control" value="{{topic}}"> |
forum/static/js/forum.js
@@ -44,7 +44,7 @@ function createForum(url, topic) { | @@ -44,7 +44,7 @@ function createForum(url, topic) { | ||
44 | url: url, | 44 | url: url, |
45 | data: {'topic': topic}, | 45 | data: {'topic': topic}, |
46 | success: function(data) { | 46 | success: function(data) { |
47 | - $(".forum_form").html(data); | 47 | + $(".topic_" + topic).find(".forum_form").html(data); |
48 | $("#id_topic").val(topic); | 48 | $("#id_topic").val(topic); |
49 | 49 | ||
50 | setForumCreateFormSubmit(); | 50 | setForumCreateFormSubmit(); |