{% extends 'blog/show_post.html' %}

{% block title %}
	{% if comment is not none %}
		Edit comment #{{ comment.id }}"
	{% else %}
		Comment on "{{ post.title }}"
	{% endif %}
{% endblock %}

{% block add_comment %}
	<form method="POST">
		{{ form.hidden_tag() }}
		<p>
			{{ form.body.label }}<br>
			{{ form.body(cols=50, row=4) }}
		</p>
		<p>{{ form.submit() }}</p> 
	</form>
	{% if comment is not none %}
		<hr>
		<form action="{{ url_for('blog.delete_comment', comment_id=comment.id) }}" method="POST">
			<input class="danger" type="submit" value="Delete" onclick="return confirm('Are you sure?');">
		</form>
	{% endif %}
{% endblock %}
