{% extends 'oscar/dashboard/layout.html' %}
{% load i18n %}

{% block title %}
    {{ title }} | {% trans "Create Option" %} | {{ block.super }}
{% endblock %}

{% block body_class %}{{ block.super }} create-page{% endblock %}

{% block navbar %}
    {% if not is_popup %}
        {{ block.super }}
    {% endif %}
{% endblock %}

{% block dashboard_nav %}
    {% if not is_popup %}
        {{ block.super }}
    {% endif %}
{% endblock %}

{% block breadcrumbs %}
    {% if not is_popup %}
        <ul class="breadcrumb">
            <li>
                <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
            </li>
            <li>
                <a href="{% url 'dashboard:catalogue-option-list' %}">{% trans "Options" %}</a>
            </li>
            <li class="active">{% trans "Delete Option?" %}</li>
        </ul>
    {% endif %}
{% endblock %}

{% block headertext %}
    {{ title }}
{% endblock %}

{% block dashboard_content %}
    {% if disallow %}
        <p>{% trans "Please make sure option is not assigned to Products or Product Classes before deletion." %}</p>
    {% else %}
        <div class="table-header">
            <h2>{% trans "Delete Option" %}</h2>
        </div>
        <form action="." method="post" class="well">
            {% csrf_token %}
            {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
            {% if not is_popup %}
            {% for key, value in http_get_params.items %}
                <input type="hidden" name="{{ key }}" value="{{ value }}" />
            {% endfor %}
            {% endif %}
            <p>
                {% blocktrans with name=object.name %}Delete Option <strong>{{ name }}</strong> - are you sure?{% endblocktrans %}
            </p>
            <div class="form-actions">
                <a href="{% url 'dashboard:catalogue-option-list' %}">
                    {% trans "Cancel" %}
                </a>
                <button type="submit" class="btn btn-danger" data-loading-text="{% trans 'Deleting...' %}">
                    {% trans "Delete" %}
                </button>
            </div>
        </form>
    {% endif %}
{% endblock %}
