{# vim: set ts=2 et sts=2 sw=2: #} {# Base template for creating a new or editing an existing question. The cases for showing uneditable product and category names are handled here. Fancier behaviors like editing them can be provided by overriding blocks. If there's a `form`, we also expect `current_product` and `current_category` so we can compute the edit-title URL. #} {% extends "questions/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% from "includes/common_macros.html" import content_editor %} {% set classes = 'new-question' %} {% block content %}

{% block headline %}Do Something to a Question{% endblock %}

{% block product %} {% if current_product %}
{{ current_product.name }} {% block product_changer %} {% endblock %}
{% endif %} {% endblock %} {% block category %} {% if current_product and current_category %}
{{ current_category.name }} {% block category_changer %} {% endblock %}
{% endif %} {% endblock %} {% block articles_and_search_results %} {% endblock %} {% if form %}
{{ csrf() }} {% block major_detail_instructions %}

Do some stuff.

{% endblock %}

{{ _('The more information you can provide, the better the chance your question will be answered.') }}

{{ errorlist(form) }} {% for field in form.hidden_fields() %} {{ field|safe }} {% endfor %}
    {% set li_class='' %} {% for field in form.visible_fields() %} {% if field.name == 'ff_version' %}
  1. {{ _("We've made some educated guesses about your current browser and operating system.") }} {{ _('Show details »')|safe }} {{ _('Hide details »')|safe }}

  2. {% set li_class='details' %} {% endif %}
  3. {{ field.label_tag()|safe }} {% if field.name == 'title' and not request.GET.edit_title %}
    {% if form.initial %}{{ form.initial.title }}{% else %}{{ form.title.data }}{% endif %} edit {{ field.as_hidden()|safe }}
    {% elif field.name == 'content' %} {{ content_editor(field) }} {% else %} {{ field|safe }} {% endif %} {% if field.help_text %}

    {{ field.help_text|safe }}

    {% endif %}
  4. {% endfor %}
  5. {% block more_submit_buttons %}{% endblock %}
{% endif %}
{% endblock %} {% block side %} {% endblock %}