{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "forums/base.html" %}
{# L10n: {t} is the title of the thread. {f} if the name of the forum. #}
{% set title = _('Delete Post | {t} | {f} | Forums')|f(t=thread.title, f=forum.name) %}
{% set crumbs = [(url('forums.forums'), _('Forums')),
                (url('forums.threads', forum.slug), forum.name),
                (url('forums.posts', forum.slug, thread.id), thread.title),
                (None, _('Delete Post'))] %}

{% block content %}
<article id="confirm-delete" class="main">
  <h1>{{ _('Are you sure you want to delete this post?') }}</h1>
  <div class="post-to-delete">
    <label>{{ _('Author') }}</label>
    <div>{{ post.author }}</div>
    <label>{{ _('Date') }}</label>
    <div>{{ datetimeformat(post.created, format='longdatetime') }}</div>
    <label>{{ _('Content') }}</label>
    <div class="content">{{ post.content_parsed }}</div>

    <form action="{{ url('forums.delete_post', forum_slug=forum.slug, thread_id=thread.id, post_id=post.id) }}" method="post">
      {{ csrf() }}
      <p>
        {{ _('You are about to permanently delete this post. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
      </p>
      <input type="submit" value="{{ _('Delete') }}" />
      <a href="{{ url('forums.posts', forum_slug=forum.slug, thread_id=thread.id) }}">{{ _('Cancel') }}</a>
    </form>
  </div>
</article>
{% endblock %}
