{% extends "base.html" %} {% load i18n %} {% load static %} {% load form_as_table %} {% load dict_parser %} {% block extracss %} {% endblock %} {% block extrajs %} {% endblock %} {% block title %} {% if form.instance.pk %} {% trans "Edit Station" %} {% else %} {% trans "Add Station" %} {% endif %} {% endblock %} {% block content %}
{% csrf_token %}
{% if form.instance.pk %}

{% trans "Edit station details for " %} {{ form.instance.name }} :

{% else %}

{% trans "Fill the station details:" %}

{% endif %} {% if form.errors %}

{% trans "Please correct the errors below: " %}{{ form.non_field_errors }}

{% endif %} {% for key,formset in formsets.items %} {% if not formset.errors|list_empty %}

{% trans "There were some errors in one of the forms. Please correct them and click the submit button again." %}

{% endif %} {% endfor %} {% form_as_table_rows form %}
{% for key,formset in formsets.items %} {{ formset.management_form }} {% endfor %}
{% if not form.instance.pk %}

{% trans "Create the station and then you'll be able to add more details."%}

{% else %} {% for key,formset in formsets.items %}

Station {{formset.prefix|title}}:

Add Another add new {{ formset.prefix|title }}

{% if not formset.errors|list_empty %}

{% trans "Please correct the errors below: " %}{{ formset.non_field_errors }}

{% endif %} {% forms_as_table_cols formset %}
{% endfor %} {% endif %}

{% endblock %}