Mercurial > agora
comparison comments/form.html @ 194:50ba20441122
Added comment template files and customized comments app files
author | ahsanalishahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Tue, 02 Jul 2013 02:04:09 +0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
193:fe51ec4eccc1 | 194:50ba20441122 |
---|---|
1 {% load comments i18n %} | |
2 | |
3 | |
4 <form action="{% comment_form_target %}" method="post"> | |
5 {% csrf_token %} | |
6 {{ form.object_pk }} | |
7 {{ form.content_type }} | |
8 {{ form.timestamp }} | |
9 {{ form.security_hash }} | |
10 {# if it is has a parent #} | |
11 | |
12 {% if node.id %} | |
13 <input type="hidden" name="parent" id="parent_id" value="{{ node.id }}" /> | |
14 <input type = 'button' value = "Reply" onClick= "$(this).ShowCommentForm({{ node.id }})" id = "{{ node.id }}-button" | |
15 class = "reply-button"/> | |
16 | |
17 {% endif %} | |
18 <!-- I have used node id over here so that I can show/hide comment field --> | |
19 <div class = "comment-box" style="{% if node.id %}display:none {% else %} display:block {%endif%}" id = "{{ node.id }}" > | |
20 <h4> | |
21 {%if node.id%} | |
22 Reply: | |
23 {%else%} Comment: | |
24 {%endif%} | |
25 </h4> | |
26 {{form.comment}} | |
27 | |
28 <br/> | |
29 <input type="submit" value = "Submit" class = 'reply-button' > | |
30 </div> | |
31 | |
32 | |
33 | |
34 </form> |