{% load heliport %} {% comment %} SPDX-FileCopyrightText: 2024 Helmholtz-Zentrum Dresden-Rossendorf (HZDR) SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% comment %} based on https://github.com/django/django/blob/main/django/forms/templates/django/forms/table.html {% endcomment %} {% if errors %} {{ errors }} {% if not fields %} {% for field in hidden_fields %}{{ field }}{% endfor %} {% endif %} {% endif %} {% for field, errors in fields %} {% if field.label %}{{ field.label_tag }}{% endif %} {{ errors }} {{ field }} {% if field.help_text %} {{ field.help_text }} {% endif %} {% if forloop.last %} {% for field in hidden_fields %}{{ field }}{% endfor %} {% endif %} {% endfor %} {% if not fields and not errors %} {% for field in hidden_fields %}{{ field }}{% endfor %} {% endif %}