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 | 39 | </div><!--column--> |
40 | 40 | </div><!--row--> |
41 | 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 | 43 | <div class="panel-body"> |
44 | 44 | <div class="presentation" id="presentation_{{topic.slug}}"> |
45 | 45 | <p> |
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | </div> |
87 | 87 | </div> |
88 | 88 | </div><!--EndPresentation--> |
89 | - <div class="editation" id="editation_{{topic.slug}}"> | |
89 | + <div class="editation topic_{{ topic.id }}" id="editation_{{topic.slug}}"> | |
90 | 90 | <div class="form-group"> |
91 | 91 | <label class="control-label" for="focusedInput2">{% trans 'Name Topic' %}</label> |
92 | 92 | <input type="text" class="form-control" value="{{topic}}"> | ... | ... |
forum/static/js/forum.js
... | ... | @@ -44,7 +44,7 @@ function createForum(url, topic) { |
44 | 44 | url: url, |
45 | 45 | data: {'topic': topic}, |
46 | 46 | success: function(data) { |
47 | - $(".forum_form").html(data); | |
47 | + $(".topic_" + topic).find(".forum_form").html(data); | |
48 | 48 | $("#id_topic").val(topic); |
49 | 49 | |
50 | 50 | setForumCreateFormSubmit(); | ... | ... |