Move posting comments to view_torrent to fix displaying form errors.

This commit is contained in:
nyaadev
2017-05-23 00:04:27 +02:00
parent b7144f80f9
commit 3fc347d049
2 changed files with 33 additions and 35 deletions

View File

@@ -176,7 +176,7 @@
</script>
{% endfor %}
{% if comment_form %}
<form action="{{ url_for('submit_comment', torrent_id=torrent.id) }}" method="POST" class="comment-box">
<form class="comment-box" method="POST">
{{ comment_form.csrf_token }}
{{ render_field(comment_form.comment, class_='form-control') }}
<input type="submit" value="Submit" class="btn btn-success btn-sm">