Fix long comments being swallowed

This commit is contained in:
rubenwardy
2022-04-23 20:05:19 +01:00
parent b67e9a8130
commit d7dd0274fa
3 changed files with 39 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
{% macro render_thread(thread, current_user) -%}
{% macro render_thread(thread, current_user, form=None) -%}
{% from "macros/reviews.html" import render_review_vote %}
@@ -114,6 +114,14 @@
{% endif %}
<input class="btn btn-primary" type="submit" disabled value="Comment" />
</div>
{% elif form %}
{% from "macros/forms.html" import render_field, render_submit_field %}
<form method="post" action="{{ url_for('threads.view', id=thread.id)}}" class="card-body">
{{ form.hidden_tag() }}
{{ render_field(form.comment, fieldclass="form-control markdown", label="") }}
{{ render_submit_field(form.submit) }}
</form>
{% else %}
<form method="post" action="{{ url_for('threads.view', id=thread.id)}}" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />

View File

@@ -92,5 +92,5 @@
{% endif %}
{% from "macros/threads.html" import render_thread %}
{{ render_thread(thread, current_user) }}
{{ render_thread(thread, current_user, form) }}
{% endblock %}