{% extends "campaign_monitor/base.html" %}
{% load perm_tags %}
{% load styled_forms %}
{% load campaign_monitor_tags %}
{% load i18n %}

{% block title %}{% trans "Delete Campaign" %} - {{ campaign.name }}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/campaign_monitor.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/delete.css">
{% endblock %}

{% block body %}
<div class="t">
	{% campaign_nav request.user %}
    
        <h1>{% trans "Delete a Campaign" %}</h1> 
        <h2><a href="{{ campaign.get_absolute_url }}">{{ campaign.name }}</a></h2>
        <div class="content">
            {% if campaign.status == 'S' %}
                <p>{% trans "This campaign has already been sent. Deleting it will remove it from your account." %}</p>
            {% endif %}
            {% if campaign.status == 'C' %}
                <p>{% trans "This campaign is scheduled for" %} {{ campaign.scheduled_date }}. {% trans "Deleting it will remove it from your account and prevent it from sending." %}</p>
            {% endif %}
            {% if campaign.status == 'D' %}
                <p>{% trans "This campaign is a draft. Deleting it will remove it from your account and prevent it from sending." %}</p>
            {% endif %}  
        </div>
        <div class="delete-prompt"> 
        	{% trans "Are you sure you want to permanently delete this campaign?" %}
        </div>
    <div class="delete-form">
        <form name="campaign-delete" method="POST" action="{% url campaign_monitor.campaign_delete campaign.campaign_id %}">{% csrf_token %}
            <input type="hidden" name="action" value="delete">
            <input type="submit" name="submit" value="{% trans "Confirm Delete" %}">
        </form>
    </div>
        <div class="back-item"><a href="{{ campaign.get_absolute_url }}">&laquo; {% trans "Back to" %} {{ campaign.name }}</a></div>
        <div class="back-search"><a href="{% url campaign_monitor.campaign_index %}">&laquo; {% trans "Back to all campaigns" %} </a></div>
</div>
{% endblock %}