{% load i18n ui %}{% comment %} One group of index parameters, checked as it changes: htmx posts the whole form with "group" and swaps in this group re-rendered (stations:indices_validate), with its warnings. How its index is named is in the section's help (#177). Without JavaScript the form is checked when it is sent. Parameters: form (IndexParamsForm), group (a key of IndexParamsForm.UNITS), analysis. {% endcomment %}
{% if group == "plot_title" %} {% include "components/field.html" with field=form.plot_title %} {% elif group == "wsdi_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.wsdi_days unit=days narrow=True %} {% elif group == "csdi_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.csdi_days unit=days narrow=True %} {% elif group == "rx_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.rx_days unit=days narrow=True %} {% elif group == "txtn_days" %} {% translate "days" as days %}{% include "components/field.html" with field=form.txtn_days unit=days narrow=True %} {% elif group == "hdd_base" %} {% include "components/field.html" with field=form.hdd_base unit="°C" narrow=True %} {% elif group == "cdd_base" %} {% include "components/field.html" with field=form.cdd_base unit="°C" narrow=True %} {% elif group == "gdd_base" %} {% include "components/field.html" with field=form.gdd_base unit="°C" narrow=True %} {% elif group == "rnnmm" %} {% translate "mm" as mm %}{% include "components/field.html" with field=form.rnnmm unit=mm narrow=True %} {% elif group == "spei_months" %} {% translate "months" as months %}{% include "components/field.html" with field=form.spei_months unit=months narrow=True %} {% elif group == "custom" %}
{% translate "Custom threshold index" %}

{% translate "Counts the days a variable is above or below a value, for example TX ≥ 40 °C." %}

{% include "components/field.html" with field=form.custom_enabled %}
{% include "components/field.html" with field=form.custom_variable %} {% include "components/field.html" with field=form.custom_operator %} {% if form.custom_variable.value == "PR" %}{% translate "mm" as unit %}{% else %}{% translate "°C" as unit %}{% endif %} {% include "components/field.html" with field=form.custom_threshold unit=unit narrow=True %}
{% endif %} {% for key, notes in form.warnings.items %}{% if key == group %}{% for note in notes %}

{% icon "warning" %}{{ note }}

{% endfor %}{% endif %}{% endfor %}