{% extends "dashboard/base.html" %} {% load i18n %} {% load materializecss %} {% load static %} {% block title %}{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %} - {% trans "Attributes" %} - {{ block.super }}{% endblock %} {% block body_class %}body-attributes{% endblock %} {% block header_menu %} {% url "dashboard:product-attributes" as url %} {% include "dashboard/includes/_back-link.html" with url=url %} {% endblock %} {% block header_extra %} {% if attribute.pk %} {% endif %} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block menu_catalogue_class %} active{% endblock %} {% block content %}
{% csrf_token %} {{ form.display|materializecss }} {{ form.name|materializecss }}
{% trans "Attribute values" %}
{{ formset.management_form }} {{ formset.non_form_errors.as_ul }} {% for form in formset.forms %} {% if forloop.first %} {% for field in form.visible_fields %} {% endfor %} {% endif %} {% for field in form.visible_fields %} {% if forloop.first %} {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} {% endif %} {{ field|materializecss }} {% endfor %} {% endfor %}
{{ field.label|capfirst }}
{% if attribute.pk %} {% else %} {% endif %}
{% endblock %}