{# Channel create/edit form. Used for both: - /settings/channels/new (channel is None) - /settings/channels/{id}/edit (channel is a Channel row; secrets are masked by the route before it hits this template). Context: channel — Channel or None (None = create). form — dict with keys name, driver, config_json. May be pre-populated from a failed POST so the user doesn't lose their input. errors — dict[field_name -> str]; rendered beside each field. drivers — list[str], registered driver names for the {% if is_edit %} {# Signals to the POST handler that the secret-preserving merge should run. Without this flag the handler treats the submitted JSON as the full config, which would wipe any secret the user left masked. #} {% endif %}

1–80 characters. Letters, digits, hyphens, underscores, or spaces. Must be unique.

{% if errors.name %}

{{ errors.name }}

{% endif %}

Registered drivers: {{ drivers|join(", ") }}.

{% if errors.driver %}

{{ errors.driver }}

{% endif %}

Paste a JSON object matching the driver's expected schema. See .env.example for the shape of each driver's config. {% if is_edit %} Secrets are masked as ••••••••; any field you leave at that value is preserved from the stored config. {% endif %}

{% if errors.config_json %}

{{ errors.config_json }}

{% endif %}
Cancel
{% endblock %}