{% comment %} Create or edit one trigger. Loaded into #trigger-form by htmx. hx-swap="none" on the form is load-bearing, not tidiness: without it htmx swaps the response into the form itself, so an unexpected body — a session-expiry redirect to the login page — would be injected into the drawer. The same reason media_library/_asset_detail.html states. {% endcomment %}
{% csrf_token %} {% comment %} The label is quoted rather than folded into the sentence. Lower-casing it into "{verb} {label} trigger" produced "New new follower trigger", and any future label starting with a verb or an article would read the same way. {% endcomment %}

{% if trigger %}Edit{% else %}Add{% endif %} “{{ spec.label }}”

{{ spec.description }}

{% comment %} Saving is deliberately still allowed. The trigger is real, it is stored, and it starts working by itself the day the platform delivers the event — so this warns rather than blocks. See TriggerSpec.unavailable. {% endcomment %} {% if spec.unavailable %}

{{ spec.unavailable }}

{% endif %} {% if spec.bindable %} {% endif %} {% if spec.type == "keyword" or spec.type == "story_reply" %} {% include "flows/triggers/_form_keyword.html" %} {% elif spec.type == "ref_url" %} {% include "flows/triggers/_form_ref_url.html" %} {% elif spec.type == "comment" %} {% include "flows/triggers/_form_comment.html" %} {% elif spec.type == "rule" %} {% include "flows/triggers/_form_rule.html" %} {% endif %}