{% load i18n %}

{% if show_delete %}
<form action="{% url 'pootle-staticpages-delete' page_type object.pk %}"
  method="post" class="staticpages-delete">
  {% csrf_token %}
  <input type="submit" class="btn btn-danger" value="{% trans 'Delete' %}" />
</form>
{% endif %}

<form action="" method="post" class="staticpages-form">
  {% csrf_token %}
  {{ form.non_field_errors }}
  {% include 'admin/staticpages/_field.html' with field=form.title %}
  {% include 'admin/staticpages/_field.html' with field=form.virtual_path help_pre='True' %}
  {% include 'admin/staticpages/_field.html' with field=form.active %}

  {% if form.url %}
  {% include 'admin/staticpages/_field.html' with field=form.url %}
  <div class="control-group-separator js-staticpage-non-content">
    <span class="help_text">{% trans "or" %}</span>
  </div>
  {% endif %}

  <div class="control-group">
    {{ form.body.label_tag }}
    <div class="controls">
      <div class="js-staticpage-editor"></div>
    </div>
  </div>

  <div class="control-group js-staticpage-non-content">
    <div class="controls controls-btn">
      <input type="submit" class="btn" value="{% trans 'Save' %}" />
      <ul>
        <li>
          {% blocktrans trimmed %}
          Use <code>&lt;a href="<strong>#/page-slug</strong>"&gt;Link text&lt;/a&gt;</code>
          code to provide links between static pages. Such links will be rewritten with
          full paths to static pages.
          {% endblocktrans %}
        </li>
        <li>
          {% blocktrans trimmed %}
          In Announcement pages use <code><strong>/xx/</strong></code> within URLs for a
          dynamic language code.
          {% endblocktrans %}
        </li>
      </ul>
    </div>
  </div>
</form>
