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

{% if step %}{{ step.name }}{% else %}{% trans "New step" %}{% endif %}

{% blocktrans with name=flow.name %}Step in {{ name }}{% endblocktrans %}

{% csrf_token %}

{% trans "Step details" %}

{% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
{{ form.name }} {% if form.name.errors %}
{{ form.name.errors|join:" " }}
{% endif %}
{{ form.order }}
{% trans "Lower numbers come first." %}
{{ form.description }}
{% trans "Short summary shown under the step name in the step list." %}
{{ form.step_type }}
{% trans "Completes on its own once every Smart Filter check below passes." %}
{% trans "The member ticks a box to confirm they've read the step." %}
{% trans "Completes once the member has an active account on the service." %}
{{ form.service_slug }}
{{ form.service_slug.help_text }}
{{ form.service_fallback_acknowledgement }}
{{ form.body }}
{{ form.body.help_text }}
{{ form.optional }}
{% trans "Optional steps count towards progress but don't block completing the flow." %}
{# ── Smart Filter checks (filter_check steps, once saved) ─────── #} {% if step %}

{% trans "Smart Filter checks" %}

{{ checks|length }}

{% trans "Every check must pass for this step to complete. Members see them as a checklist in this order." %}

{% if checks %}
    {% for sc in checks %}
  1. {{ sc.order }}
    {{ sc.label|default:sc.filter }}
    {% if sc.label %}{{ sc.filter }}{% endif %}
    {% csrf_token %}
  2. {% endfor %}
{% else %}
{% trans "No checks yet, so this step completes automatically for everyone. Add at least one." %}
{% endif %} {% if has_filters %}
{% csrf_token %}

{% trans "Add a check" %}

{{ check_form.filter }}
{{ check_form.label }}
{{ check_form.label.help_text }}
{{ check_form.order }}
{% else %}
{% blocktrans %}No Smart Filters are in the catalog yet. Run python manage.py pipeline_sync_filters to import your existing filters, or add one in the Django admin.{% endblocktrans %}
{% endif %}
{% endif %}
{% endblock %}