{% extends 'dashboard/layout.html' %} {% load i18n %} {% load currency_filters %} {% block body_class %}catalogue{% endblock %} {% block title %} {% trans "Update product" %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %}
{% csrf_token %}

{% trans "Product Details" %}

{{ form.non_field_errors }} {% for field in form %} {% if field.is_hidden %} {{ field }} {% endif %} {% if 'attr' not in field.id_for_label %}
{% if field.is_hidden %} {{ field }} {% else %}
{{ field }} {% for error in field.errors %} {{ error }} {% endfor %} {% if field.help_text %} {{ field.help_text }} {% endif %}
{% endif %}
{% endif %} {% endfor %}

{% trans "Product Attributes" %}

{% for field in form %} {% if 'attr' in field.id_for_label %}
{% if field.is_hidden %} {{ field }} {% else %}
{{ field }} {% for error in field.errors %} {{ error }} {% endfor %} {% if field.help_text %} {{ field.help_text }} {% endif %}
{% endif %}
{% endif %} {% endfor %}

{% trans "Category" %}

{{ category_formset.management_form }} {{ category_formset.non_form_errors }} {% for category_form in category_formset %} {% include "partials/form_fields_inline.html" with form=category_form %} {% endfor %}

{% trans "Upload, change or remove images" %}

{{ image_formset.management_form }} {{ image_formset.non_form_errors }}
    {% for image_form in image_formset %} {% include "dashboard/partials/product_images.html" with form=image_form %} {% endfor %}

{% trans "Stock and price information" %}

{{ stockrecord_form.non_field_errors }}

{% trans "Partner" %}

{% for field in stockrecord_form %} {% if "partner" in field.id_for_label %} {% include "dashboard/partials/stock_info.html" %} {% endif %} {% endfor %}

{% trans "Price" %}

{% for field in stockrecord_form %} {% if "price" in field.id_for_label %} {% include "dashboard/partials/stock_info.html" %} {% endif %} {% endfor %}

{% trans "Stock levels" %}

{% for field in stockrecord_form %} {% if "stock" in field.id_for_label %} {% include "dashboard/partials/stock_info.html" %} {% endif %} {% endfor %}

{% trans "Cancel" %} {% trans "or" %}
{% if product %} {% trans "View on site" %} {% endif %}
{% endblock dashboard_content %}