{% extends "schedules/_layout.html" %} {% from "_macros.html" import icon %} {% set section = "scheduled" %} {% block title %}New scheduled task - {{ brand.name }}{% endblock %} {% block heading %}What do you want to schedule?{% endblock %} {% block actions %} Cancel {% endblock %} {% block schedules_content %} {# One question first, and the detail worked out from the answer. The manual fields are on the same page rather than behind a second screen: somebody who already knows exactly when it should run should not have to describe it in prose and hope, and the fields are also where a compile that did not work out lands — so they cannot be a fallback that only appears when something breaks. #}

Times are read as {{ timezone }}. Say how often, and what should happen.

{% if compiled %} {% if compiled.reason %}
{{ icon("warning", "alert__icon") }} {{ compiled.reason }}
{% elif summary %}
{{ icon("check", "alert__icon") }} This will run {{ summary }}. Check it below and change anything that is not what you meant.
{% endif %} {% endif %}
{# Pre-filled from the compile when there was one. `schedule` is None here, so the shared fields fall back to their empty state — which is why the two compiled text values are written in explicitly rather than left to it. #} {% include "schedules/_form.html" %} {% if models %}
{% endif %}
{% endblock %}