{# ABOUTME: Collection create/edit form partial — name, description, raw rule query. #} {# ABOUTME: The raw query textarea is the single source of truth; errors render inline at HTTP 200. #}
{% if convert_warning %} {# Destructive static<->rule conversion: warn before the irreversible write. #} {# The hidden confirm field makes the next submit execute the conversion. #}

⚠ {{ convert_warning }}

{% endif %}
{% if errors.name %} {% endif %}
{# Raw textarea is the single source of truth; the builder below only appends to it. #} {% include "_collection_query_field.html" %} {% if errors.query %} {% include "_collection_query_error.html" %} {% endif %} {# Append-only query builder: a beginner on-ramp that composes one valid clause #} {# at a time into the textarea. Collapsed by default; advanced users hand-edit raw. #}
Query builder — add a condition
{{ query_fields[0].hint }} {# formaction degrades gracefully without JS by posting to the append route. #}
{# Explicit (non-debounced) preview: mid-typing Lucene is constantly invalid. #} {# formaction degrades gracefully without JS by posting to the same route. #}
Cancel