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

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

{% block title %}
    {{ title }} | {{ partner.name }} | {% trans "Partners" %} | {{ block.super }}
{% 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="{% url 'dashboard:partner-list' %}">{% trans "Partners" %}</a></li>
            {% if partner %}
                <li class="breadcrumb-item">
                    <a href="{% url 'dashboard:partner-manage' pk=partner.id %}">{{ partner.name }}</a>
                </li>
            {% endif %}
            <li class="breadcrumb-item active" aria-current="page">{{ title }}</li>
        </ol>
    </nav>
{% endblock %}

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

{% block dashboard_content %}
    <form id="user_partner_form" method="post" class="card card-body form-stacked wysiwyg" enctype="multipart/form-data">
        {% csrf_token %}
        {% include 'oscar/dashboard/partials/form_fields.html' with form=form %}
        <div class="form-actions">
            <button class="btn btn-primary" type="submit" data-loading-text="{% trans 'Saving...' %}">{% trans "Save" %}</button>
            {% trans "or" %} <a href="{% url 'dashboard:partner-manage' pk=partner.pk %}">{% trans "cancel" %}</a>.
        </div>
    </form>

{% endblock dashboard_content %}
