{% extends "admin/layout.html" %}
{% from "admin/_form_helpers.html" import render_formbox %}
{% block title %}{{ _("Edit Comment") }}{% endblock %}
{% block contents %}
  <h1>{{ _("Edit Comment") }}</h1>
  {% if form.comment.is_pingback %}
  <p>
    This comment was submitted as pingback.  If you will change the URL
    of the comment the blog software that submitted this pingback will
    probably submit a new pingback after some time.
  <p>
  {% endif %}
  {% call form() %}
    {% if form.comment.anonymous %}
      {{ render_formbox(form.author, toggleable=false) }}
      {{ render_formbox(form.email, toggleable=false) }}
      {{ render_formbox(form.www, toggleable=false) }}
    {% else %}
      <div class="formbox">
        <h3>{{ form.author.label() }}</h3>
        {{ form.author(disabled=true) }}
      </div>
    {% endif %}
    <div class="formbox">
      <h3>{{ form.text.label() }}</h3>
      {{ form.text(rows=7) }}
    </div>
    {{ render_formbox(form.parser) }}
    {{ render_formbox(form.pub_date) }}
    <div class="formbox toggleable collapsed">
      <h3>{{ form.blocked.label() }}</h3>
      {{ form.blocked() }} {{ form.blocked.label() }}
      <p>
        {{ form.blocked_msg.label() }}:
        {{ form.blocked_msg() }}
    </div>
    <div class="actions">
      <input type="submit" value="{{ _('Save') }}">
      <input type="submit" name="delete" value="{{ _('Delete') }}">
      <input type="submit" name="cancel" value="{{ _('Cancel') }}">
    </div>
  {% endcall %}
{% endblock %}
