+{% load url from future %}
+{% load i18n pybb_tags %}
+<form class="post-form" action="
+ {% if forum %}
+ {% url 'pybb:add_topic' forum.pk %}
+ {% else %}
+ {% if topic %}
+ {% url 'pybb:add_post' topic.pk %}
+ {% else %}
+ {% url 'pybb:edit_post' pk=object.pk %}
+ {% endif %}
+ {% endif %}" method="post" enctype="multipart/form-data">
+ {% csrf_token %}
+ <fieldset>
+ {% include "pybb/form_errors.html" %}
+ {% if form.name %} {% include "pybb/form_field.html" with field=form.name %} {% endif %}
+
+ {% if lesson_editable %}
+ {% include "pybb/form_field.html" with field=form.lesson %}
+ {% endif %}
+
+ {% if form.login %} {% include "pybb/form_field.html" with field=form.login %} {% endif %}
+ {% if form.body %} {% include "pybb/form_field.html" with field=form.body %} {% endif %}
+ <div id='emoticons'>
+ {% for smile, url in form.available_smiles.items %}
+ <a href='#' title='{{ smile|safe }}'><img src='{{ STATIC_URL }}{{ form.smiles_prefix }}{{ url }}'></a>
+ {% endfor %}
+ </div>
+
+ {% if form.poll_type %}
+ {% include "pybb/poll_edit_form.html" %}
+ {% endif %}
+ {% include "pybb/attachments_formset.html" %}
+ <p class="submit">{% include "pybb/_button_submit.html" %}</p>
+ </fieldset>
+</form>