pinax/announcements/announcement_form.html

{% extends "pinax/announcements/base.html" %}

{% load i18n bootstrap %}

{% block body %}
    {% if announcement %}
        {% url "pinax_announcements:announcement_update" pk=announcement.pk as post_url %}
    {% else %}
        {% url "pinax_announcements:announcement_create" as post_url %}
    {% endif %}

    <form action="{{ post_url }}" method="POST">
        {% csrf_token %}
        <h2>{% if announcement %}{% trans "Edit Announcement" %}{% else %}{% trans "Create Announcement" %}{% endif %}</h2>
        {{ form|bootstrap }}
        <div class="form-actions">
            <a href="{% url "pinax_announcements:announcement_list" %}" class="cancel">{% trans "Cancel" %}</a>
            {% if announcement %}
                <a href="{% url "pinax_announcements:announcement_delete" pk=announcement.pk %}" class="delete">{% trans "Delete" %}</a>
            {% endif %}
            <button>{% trans "Save" %}</button>
        </div>
    </form>
{% endblock %}