{% extends 'oscar/dashboard/layout.html' %} {% load i18n static %} {% block body_class %}stores{% endblock %} {% block title %} {{ title }} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %} {% if form.errors %}
{% trans "Your submitted data did not validate - please correct the below errors and resubmit." %}
{% endif %}
{% csrf_token %} {% if form.non_field_errors %} {% for error in form.non_field_errors %}
{{ error }}
{% endfor %} {% endif %}

{% trans "Store details" %}

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

{% trans "Contact details" %}

{% block contact_details_fields %} {% include "oscar/dashboard/partials/form_field.html" with field=form.manager_name %} {% include "oscar/dashboard/partials/form_field.html" with field=form.phone %} {% include "oscar/dashboard/partials/form_field.html" with field=form.email %} {% endblock contact_details_fields %}

{% trans "Address" %}

{% block address_fields %} {% with formset=inlines.1 %} {{ formset.management_form }} {% for address_form in formset %} {% if address_form.non_field_errors %} {% for error in address_form.non_field_errors %}
{{ error }}
{% endfor %} {% endif %} {% for field in address_form %} {% include "oscar/dashboard/partials/form_field.html" %} {% endfor %} {% endfor %} {% endwith %} {% endblock address_fields %}

{% trans "Location" %}

{% block location_fields %}

{% blocktrans %} Enter an address in the location input and select your address from the options that appear. You can drag the marker around on the map to fine-tune the location. {% endblocktrans %}

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

{% trans "Opening hours" %}

{% block opening_hours_fields %} {# use the first formset which is the opening times #} {% with workhours=inlines.0 %} {{ formset.management_form }} {% for formset in workhours %} {% if formset.non_field_errors %} {% for error in formset.non_field_errors %}
{{ error }}
{% endfor %} {% endif %}
{{ formset.open }}
{{ formset.0.start.label_tag }}
{{ formset.0.end.label_tag }}
{% for form in formset %}
{{ form.start }}
{{ form.end }}
{{ form.id }} {% if form.errors %}
{% for field in form %} {% if field.errors %} {{ field.label }}: {% for err in field.errors %}{{ err }}{% endfor %}
{% endif %} {% endfor %} {# Non-field errors #} {% if form.non_field_errors %} {{ form.non_field_errors }}
{% endif %}
{% endif %}
{% endfor %}
{{ formset.management_form }}
{% endfor %} {% endwith %} {% endblock opening_hours_fields %}
{% block extra_field_blocks %} {% endblock extra_field_blocks %}
{% trans "or" %} {% trans "cancel" %}
{% endblock dashboard_content %} {% block extrascripts %} {{ block.super }} {% endblock %} {% block onbodyload %} {{ block.super }} stores.dashboard.init(); {% endblock onbodyload %}