{% extends 'oscar/dashboard/layout.html' %} {% load i18n %} {% block title %} {{ title }} | {% trans "Create product type" %} | {{ block.super }} {% endblock %} {% block body_class %}{{ block.super }} create-page{% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %}
{% csrf_token %}
{% block tab_nav %}

{% trans "Sections" %}

{% endblock tab_nav %}
{% block tab_content %} {% block product_class_details %}

{% trans "Product Class details" %}

{% comment %} If the ProductClass form has field_errors, partials/form_fields.html will render an error message. This means that there'll be 2 error messages, one from the partial and one from the view. Perhaps there should be an option allowing hiding of the error message in the template. For now we copy paste what we need from the template. {% endcomment %} {% if form.non_field_errors %} {% for error in form.non_field_errors %}
{{ error }}
{% endfor %} {% endif %} {% for field in form %} {% include 'oscar/dashboard/partials/form_field.html' with field=field %} {% endfor %}
{% endblock %} {% block product_attributes %}

{% trans "Product attributes" %}

{{ attributes_formset.management_form }} {{ attributes_formset.non_form_errors }} {% for attribute_form in attributes_formset %} {% for hidden_field in attribute_form.hidden_fields %} {{ hidden_field }} {% endfor %} {% endfor %}
{% trans "Name" %} {% trans "Code" %} {% trans "Type" %} {% trans "Required" %} {% trans "Delete?" %}
{% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.name nolabel=True %} {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.code nolabel=True %} {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.type nolabel=True %} {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.option_group nolabel=True %} {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.required nolabel=True %} {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.DELETE nolabel=True %}
{% endblock %} {% endblock tab_content %}
{% block fixed_actions_group %}
{% trans "Cancel" %} {% trans "or" %}
{% endblock fixed_actions_group %}
{% endblock dashboard_content %} {% block onbodyload %} {{ block.super }} oscar.dashboard.product_attributes.init(); {% endblock %}