{% extends "base.html" %} {% load i18n static ui help %} {% comment %} A station's setup page (the New station page of #201; Add stations starts a station since #233, and the first visit's form went with #271): the file, then the station details, then one button that checks the data and calculates every index. One form, so without JavaScript a new file and the details can go together; with it a chosen file is read at once and the page comes back with the file card. Context from views.setup_context. {% endcomment %} {% block title %}{% if returning %}{% blocktranslate with name=analysis.station_name %}Station details: {{ name }}{% endblocktranslate %}{% else %}{% translate "New station" %}{% endif %}{% endblock %} {% block head %}{% endblock %} {% block content %}

{% if returning %}{{ analysis.station_name|default:analysis.file_name }}{% else %}{% translate "New station" %}{% endif %}

{% if returning %}{% translate "The new file needs a change to the station details before the checks and the indices can run." %}{% else %}{% translate "Two things, then Climpact checks your data and calculates every index." %}{% endif %}

{% csrf_token %}

{% translate "Your file" %}

{% section_help "upload.file" %}
{% if inspection and not inspection.ok %}{% include "stations/_problems.html" %} {% elif upload_form.errors %}{% include "components/form_errors.html" with form=upload_form %}{% endif %} {% include "stations/_file_card.html" with file_name=analysis.file_name summary=analysis.summary field=upload_form.station_file %} {% if analysis.warnings %}
{% icon "warning" %}

{% blocktranslate count counter=analysis.warnings|length trimmed %}Something to check in the file{% plural %}{{ counter }} things to check in the file{% endblocktranslate %}

    {% for warning in analysis.warnings %}
  • {{ warning }}
  • {% endfor %}

{% translate "You can still go on. The quality checks look at the data next." %}

{% endif %}

{% translate "Station details" %}

{% section_help "load.details" %}
{% if form.is_bound %}{% include "components/form_errors.html" %}{% endif %}
{% include "stations/_unit.html" with group="station_name" %}
{% include "stations/_unit.html" with group="latitude" %} {% include "stations/_unit.html" with group="longitude" %}
{% include "stations/_unit.html" with group="base_period" %}
{% turnstile %}
{% translate "Check and calculate" as go_label %} {% include "components/button.html" with label=go_label type="submit" name="intent" value="go" icon_end="arrow-right" size="lg" describedby="setup-defaults" %}

{% translate "Quality thresholds and index settings use the defaults. You can change them later in Inputs." %}

{% include "stations/_retention.html" with quiet=True %}
{% csrf_token %} {% translate "Delete this data now" as delete_label %} {% include "components/button.html" with label=delete_label type="submit" variant="ghost" size="sm" icon="close" %} {% translate "Start again with another station" %}
{% endblock %}