{% extends "wiki/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% from "wiki/includes/sidebar_modules.html" import document_tools with context %} {% from "includes/common_macros.html" import content_editor with context %} {% from "wiki/includes/document_macros.html" import edit_messages, submit_revision %} {% from "wiki/includes/document_macros.html" import document_lock_warning with context %} {% set title = _('Edit Article | {document}')|f(document=document.title) %} {# TODO: Change KB url to landing page when we have one #} {% set crumbs = [(document.get_absolute_url(), document.title), (None, _('Edit Article'))] %} {% set ga_content_group = "kb-cms" %} {% set scripts = ('wiki', 'wiki.diff', 'wiki.editor') %} {% if document.is_switching_devices_document %} {% set scripts = scripts + ('switching-devices',) %} {% endif %} {% set classes = 'edit' %} {% block content %}
{% if document.is_restricted %}
{{ _('This document is restricted.') }}
{% endif %} {{ edit_messages(document, show_revision_warning) }} {{ document_lock_warning() }}

{{ _('Editing Content For:
{title}')|fe(title=document.title) }}

{% if document.needs_change %}

{% trans comment=document.needs_change_comment %} {{comment}} {% endtrans %}

{% endif %}

{% trans url=url('wiki.document', 'support-document-guide') %}For help with writing articles, check out the Support Document Guide.{% endtrans %}

{{ errorlist(revision_form) }}
{% csrf_token %} {% for field in revision_form.visible_fields() %}
{% if field.name not in ['comment', 'content'] %} {% if not field.name == 'keywords' or document.allows(user, 'edit_keywords') %} {{ field|label_with_help }}{{ field|safe }} {% endif %} {% elif field.name == 'content' %} {{ revision_form.content.label_tag()|safe }} {{ content_editor(revision_form.content) }} {% endif %} {% if field.name == 'summary' %}

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

{% endif %}
{% endfor %} {{ revision_form.hidden_fields()|join|safe }} {{ submit_revision(revision_form, include_diff=True) }}
{{ revision_form.content.value() }}
{{ submit_revision(revision_form, buttons_only=True, include_diff=True) }}
{% endblock %} {% block side_top %} {{ document_tools(document, document.parent, user, 'edit', settings) }} {% endblock %}