Mercurial > agora-palash
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/comments/form.html Tue Jul 02 02:04:09 2013 +0500 @@ -0,0 +1,34 @@ +{% load comments i18n %} + + +<form action="{% comment_form_target %}" method="post"> + {% csrf_token %} + {{ form.object_pk }} + {{ form.content_type }} + {{ form.timestamp }} + {{ form.security_hash }} + {# if it is has a parent #} + + {% if node.id %} + <input type="hidden" name="parent" id="parent_id" value="{{ node.id }}" /> + <input type = 'button' value = "Reply" onClick= "$(this).ShowCommentForm({{ node.id }})" id = "{{ node.id }}-button" + class = "reply-button"/> + + {% endif %} + <!-- I have used node id over here so that I can show/hide comment field --> + <div class = "comment-box" style="{% if node.id %}display:none {% else %} display:block {%endif%}" id = "{{ node.id }}" > + <h4> + {%if node.id%} + Reply: + {%else%} Comment: + {%endif%} + </h4> + {{form.comment}} + + <br/> + <input type="submit" value = "Submit" class = 'reply-button' > + </div> + + + +</form>