{% extends 'dashboard/layout.html' %} {% load i18n %} {% load staticfiles %} {% block body_class %}stores{% endblock %} {% block extrahead %} {% endblock %} {% block title %} {% if store %} {% blocktrans with store_name=store.name %} Update store {{ store_name }} {% endblocktrans %} {% else %} {% trans "Create new store" %} {% endif %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block header %} {% endblock header %} {% block dashboard_content %}
{% csrf_token %}

{% trans "Store Details" %}

{{ form.non_field_errors }} {% for field in form %} {% include "partials/field.html" %} {% if forloop.first %} {# add the address inline form here #} {% with formset=inlines.1 %} {{ formset.management_form }} {% for address_form in formset %} {% for field in address_form %} {% include "partials/field.html" %} {% endfor %} {% endfor %} {% endwith %} {% endif %} {% endfor %}
{# we are adding the contact detail inline form here #} {% with formset=inlines.2 %}

{% trans "Store contact" %}

{{ formset.management_form }} {% for contact_form in formset %} {% for field in contact_form %} {% include "partials/field.html" %} {% endfor %} {% endfor %}
{% endwith %}

{% trans "Store location" %}

{# use the first formset which is the opening times #} {% with formset=inlines.0 %}

{% trans "Opening Hours" %}

{{ formset.management_form }} {% for form in formset %}
{% for field in form %} {% include "partials/field_inline.html" %} {% endfor %}
{% endfor %}
{% endwith %}
{% trans "Cancel" %} or
{% endblock dashboard_content %} {% block extrascripts %} {{ block.super }} {% endblock %} {% block onbodyload %} stores.dashboard.init(); {% endblock onbodyload %}