{% import "macros.html" as macros %}
<form id="fmask" action="" method="post" >{% csrf_token %}
    <div class="form-item ask-form-bar">
        <div id="askFormBar">
            <input id="id_title" class="questionTitleInput" name="title" autocomplete="off"
                value="{% if form.initial.title %}{{form.initial.title|escape}}{% endif %}"/>
            <span class="form-error">{{ form.title.errors }}</span>
        </div>
        <div class="title-desc">
            {{ form.title.help_text }}
        </div>
    </div>
    {{
        macros.edit_post(
            form,
            post_type = 'question',
            edit_title = False,
            mandatory_tags = mandatory_tags,
            use_category_selector = (settings.TAG_SOURCE == 'category-tree'),
            editor_type = settings.EDITOR_TYPE,
            user = request.user
        )
    }}
    {{ form.group_id }}
    <div class="question-options">
        {% if settings.WIKI_ON %}
            {{ macros.checkbox_in_div(form.wiki) }}
        {% endif %}
        {% if settings.ALLOW_ASK_ANONYMOUSLY %}
            {{ macros.checkbox_in_div(form.ask_anonymously) }}
        {% endif %}
        {% if settings.GROUPS_ENABLED and
            request.user.is_authenticated() and
            request.user.can_make_group_private_posts()
        %}
            {{ macros.checkbox_in_div(form.post_privately) }}
        {% endif %}
        {% if settings.MULTILINGUAL %}
        <div class="lang-selector">
            <label for="id_language">{% trans %}Select language{% endtrans %}</label>
            {{ form.language }}
        </div>
        {% endif %}
    </div>
    {% if not request.user.is_authenticated() %}
    <input type="submit" name="post_anon" value="{% trans %}Login/Signup to Post{% endtrans %}" class="submit" />
    {% else %}
    <input type="submit" name="post" value="{% trans %}Ask Your Question{% endtrans %}" class="submit" />
    {% endif %}
    <div class="clean"></div>
</form>
