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

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

{% block breadcrumbs %}
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a></li>
            <li class="breadcrumb-item">
                <a href="{% if parent %}{% url 'dashboard:catalogue-category-detail-list' pk=parent.pk %}{% else %}{% url 'dashboard:catalogue-category-list' %}{% endif %}">
                    {% trans "Categories" %}
                </a>
            </li>
            <li class="breadcrumb-item active" aria-current="page">{% trans "Delete category?" %}</li>
        </ol>
    </nav>
{% endblock %}

{% block headertext %}
    {% trans "Delete category?" %}
{% endblock %}

{% block dashboard_content %}
    <div class="table-header">
        <h2>{% trans "Delete category" %}</h2>
    </div>
    <form method="post" class="card card-body bg-light">
        {% csrf_token %}
        {{ form }}
        {% blocktrans with name=object.name %}
            <p>Delete category <strong>{{ name }}</strong> - are you sure?</p>
        {% endblocktrans %}
        <div class="form-actions">
            <button type="submit" class="btn btn-danger" data-loading-text="{% trans 'Deleting...' %}">{% trans "Delete" %}</button>
        {% trans "or" %} <a href="{% if parent %}{% url 'dashboard:catalogue-category-detail-list' pk=parent.pk %}{% else %}{% url 'dashboard:catalogue-category-list' %}{% endif %}">{% trans "cancel" %}</a>
    </div>
</form>
{% endblock %}
