{% extends 'oscar/dashboard/layout.html' %} {% load i18n %} {% block title %} {{ title }} | {% trans "Create Attribute Option Group" %} | {{ 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 %} {% endif %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %}
{% csrf_token %}
{% if is_popup %}{% endif %} {% if to_field %}{% endif %} {% block tab_nav %}

{% trans "Sections" %}

{% endblock tab_nav %}
{% block tab_content %} {% block attribute_option_group_details %}

{% trans "Attribute Option Group details" %}

{% comment %} If the AttributeOptionGroup 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 attribute_options %}

{% trans "Attribute Options" %}

{{ attribute_option_formset.management_form }} {{ attribute_option_formset.non_form_errors }} {% for attribute_option_form in attribute_option_formset %} {% for hidden_field in attribute_option_form.hidden_fields %} {{ hidden_field }} {% endfor %} {% endfor %}
{% trans "Option" %} {% trans "Delete?" %}
{% include 'oscar/dashboard/partials/form_field.html' with field=attribute_option_form.option nolabel=True %} {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_option_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 %}