{% extends 'dashboard/layout.html' %} {% load i18n %} {% load staticfiles %} {% block body_class %}stores{% endblock %} {% block extrahead %} {% endblock %} {% block title %} {{ title }} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block header %} {% endblock header %} {% block dashboard_content %} {% if form.errors %}
{% trans "Your submitted data did not validate - please correct the below errors and resubmit." %}
{% endif %}
{% csrf_token %}

{% trans "Store details" %}

{% include "partials/form_field.html" with field=form.name %} {% include "partials/form_field.html" with field=form.description %} {% include "partials/form_field.html" with field=form.reference %} {% include "partials/form_field.html" with field=form.group %} {% include "partials/form_field.html" with field=form.image %} {% include "partials/form_field.html" with field=form.is_pickup_store %} {% include "partials/form_field.html" with field=form.is_active %}

{% trans "Contact details" %}

{% include "partials/form_field.html" with field=form.manager_name %} {% include "partials/form_field.html" with field=form.phone %} {% include "partials/form_field.html" with field=form.email %}

{% trans "Address" %}

{% with formset=inlines.1 %} {{ formset.management_form }} {% for address_form in formset %} {% for field in address_form %} {% include "partials/form_field.html" %} {% endfor %} {% endfor %} {% endwith %}

{% trans "Location" %}

{% include "partials/form_field.html" with field=form.location %}
{% if form.location.errors %}
{% trans "Please select a location for your store." %}
{% endif %}

{% trans "Opening hours" %}

{# use the first formset which is the opening times #} {% with formset=inlines.0 %}
{{ formset.management_form }} {% for form in formset %}
{% for field in form %} {% include "partials/field_inline.html" %} {% endfor %}
{% endfor %} {% endwith %}
{% trans "Cancel" %} {% trans "or" %}
{% endblock dashboard_content %} {% block extrascripts %} {{ block.super }} {% endblock %} {% block onbodyload %} {{ block.super }} stores.dashboard.init(); $('.nav-list a').on('shown', function (e) { google.maps.event.trigger(stores.dashboard.map, 'resize'); }) {% endblock onbodyload %}