{% extends "wiki/base.html" %} {% from "includes/common_macros.html" import for_contributors_sidebar %} {% from "layout/errorlist.html" import errorlist %} {% from "includes/common_macros.html" import content_editor with context %} {% from "wiki/includes/document_macros.html" import submit_revision %} {% set title = _('Create a New Article | Knowledge Base') %} {# TODO: Change KB url to landing page when we have one #} {% set crumbs = [(None, _('New Article'))] %} {% set classes = 'new' %} {# Always include "switching-devices" because there's no way to predict when it's really needed. #} {% set scripts = ('wiki', 'wiki.editor', 'switching-devices') %} {% set ga_content_group = "kb-cms" %} {% block content %}

{{ _('Create a New Knowledge Base Article') }}

{{ errorlist(document_form) }} {{ errorlist(revision_form) }}
{% csrf_token %}
    {% if in_staff_group(request.user) %}
  • {{ _("Restrict Visibility") }} {{ document_form.restrict_to_groups|label_with_help }} {{ document_form.restrict_to_groups }} {{ document_form.restrict_to_groups.errors }}
  • {% endif %} {% for field in document_form.visible_fields() if (field.name != 'restrict_to_groups') and (field.name != 'is_localizable' or settings.WIKI_DEFAULT_LANGUAGE == request.LANGUAGE_CODE) %}
  • {# manually reorder checkboxes #} {% if field.name in ['allow_discussion', 'is_localizable'] %} {{ field|safe }} {{ field|label_with_help }} {% else %} {{ field|label_with_help }} {% if field.name in ['products', 'topics'] %} {% endif %} {{ field|safe }} {% endif %} {{ field.errors }}
  • {% endfor %}
    {% for field in revision_form.visible_fields() %}
  • {% if field.name not in ['comment', 'content'] %} {{ field|label_with_help }}{{ field|safe }} {% elif field.name == 'content' %} {{ revision_form.content.label_tag()|safe }} {{ content_editor(revision_form.content) }} {% endif %} {{ field.errors }} {% if field.name == 'summary' %}

    {{ field.field.max_length }} {{ _('characters remaining.') }}

    {% endif %}
  • {% endfor %}
{{ revision_form.hidden_fields()|join|safe }} {{ submit_revision(revision_form) }}
{% endblock %} {% block side_top %} {% endblock %}