{% load i18n %}{% comment %} The form page's form, and what an htmx request for it is answered with: a file of its own rather than a ``partialdef``, so it renders on every Django this package supports. ``as_div`` rather than ``{{ form }}``, which is a table below Django 5.0. The form renders each field's own ``required``, which a partial page's form has switched off; a question's message is the form's non-field error and its asked field is in the form, so each is rendered once. A page serving actions renders one button per action, named by its key, and an unavailable action's reason with its button disabled, a refused one's button disabled with no reason (test_the_form_page under TestARefusedActionIsDisabledWithNoReason fails without that or); the fieldset is disabled only when no action is available, and its reason is each action's (test_the_form_page_disables_the_form fails if the page's own repeats one, and test_every_condition_met_leaves_the_form_enabled if it shows unmet). The URL to return to, where the view reads one, is posted again as a hidden input, since a refused post may have carried it in its body alone. A post answered with a file is never boosted: an htmx request cannot save it. {% endcomment %}{% include "django_spec_html/target.html" %} {% if unavailable and not view.actions %}

{{ unavailable.reason }}

{% endif %} {% for name, why in action_buttons %}{% if why %}

{{ why.reason }}

{% endif %}{% endfor %}{% if spec.partial %}

{% translate "A field left blank is left as it is." %}

{% endif %}
{% csrf_token %}{% if next %}{% endif %} {{ form.as_div }} {% for name in view.actions %}{% empty %}{% endfor %}