{% set page_title = _("New Topic") %}
{% set active_forum_nav=True %}

{% extends theme("layout.html") %}

{% block content %}
{% from theme("macros.html") import render_field, render_submit_field, render_quickreply %}

<div class="page-view">
    <ol class="breadcrumb flaskbb-breadcrumb">
        <li><a href="{{ url_for('forum.index') }}">{% trans %}Forum{% endtrans %}</a></li>
        <li><a href="{{ forum.url }}">{{ forum.title }}</a></li>
        <li class="active">{% trans %}New Topic{% endtrans %}</li>
    </ol>


    <form class="form-horizontal" role="form" method="post">
        {{ form.hidden_tag() }}
        <div class="panel page-panel">
            <div class="panel-heading page-head">
                {% trans %}New Topic{% endtrans %}
            </div>

            <div class="panel-body page-body">
                {{ form.hidden_tag() }}
                <div class="col-md-12 col-sm-12 col-xs-12">

                    {{ render_field(form.title, div_class="col-md-12 col-sm-12 col-xs-12") }}

                    <div class="form-group">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="editor-box">

                                {{ run_hook("flaskbb_tpl_form_new_topic_before", form=form) }}

                                <div class="editor">
                                    {{ render_quickreply(form.content, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                                </div>

                                {{ run_hook("flaskbb_tpl_form_new_topic_after", form=form) }}

                                <div class="editor-submit">
                                    {{ render_submit_field(form.submit, input_class="btn btn-success pull-right") }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {% include theme('editor_help.html') %}
    </form>
</div>
{% endblock %}
