{% extends 'pipeline/base.html' %} {% load i18n %} {% block page_title %}{{ page_title }}{% endblock %} {% block pipeline_content %}

{{ page_title }}

{% trans "Back" %}
{% if messages %} {% for message in messages %} {% endfor %} {% endif %}
{% if step %}{% trans "Edit Step" %}{% else %}{% trans "New Step" %}{% endif %} — {{ flow.name }}
{% csrf_token %}
{{ form.name }} {% if form.name.errors %}
{{ form.name.errors }}
{% endif %}
{{ form.order }}
{{ form.description }}
{% trans "Short summary shown in the step sidebar." %}
{{ form.step_type }}
{{ form.service_slug }}
{{ form.service_slug.help_text }}
{{ form.service_fallback_acknowledgement }}
{{ form.service_fallback_acknowledgement.help_text }}
{{ form.body }}
{{ form.body.help_text }}
{{ form.optional }}
{% trans "Optional steps do not block flow completion." %}
{% trans "Cancel" %}
{# ── Smart Filter Checks (filter_check steps only, only when editing) ─── #} {% if step %}
{% trans "Smart Filter Checks" %} {{ checks|length }}

{% trans "All checks must pass for this step to be marked complete. Checks are evaluated in order." %}

{% if checks %}
    {% for sc in checks %}
  • {{ sc.order }}
    {{ sc.label|default:sc.filter }}
    {% if sc.label %} {{ sc.filter }} {% endif %}
    {% csrf_token %}
  • {% endfor %}
{% else %}
{% trans "No checks configured. This step will auto-pass until at least one check is added." %}
{% endif %} {# ── Add check form ────────────────────────────────── #} {% if has_filters %}
{% trans "Add a check" %}
{% csrf_token %}
{{ check_form.filter }}
{{ check_form.label }}
{{ check_form.label.help_text }}
{{ check_form.order }}
{% else %}
{% blocktrans %} No Smart Filters are registered in the catalog yet. Run python manage.py pipeline_sync_filters to import existing filters, or add a Smart Filter object via the Django admin first. {% endblocktrans %}
{% endif %}
{% endif %}
{% endblock %}