{#- Edit form of the task dialog. Expects: t, values, waiting_values, form_areas, optional error / saved / warnings. The box is refetched on live events only while the form is untouched (see app.js). -#}
{#- After a failed save the form holds the user's unsaved input: dirty, so live events keep it. #}
{% if error %} {% elif saved %}

Saved.

{% endif %} {% for warning in warnings %}

{{ warning }}

{% endfor %}
{#- A tag input: the chosen areas as coloured chips with a remove cross, a text box that adds a name on Enter or a comma (a new one is added to the project), and the project's other areas as chips that add themselves. The hidden `area` field carries the names, comma-separated (app.js). #} {%- set area_value = values.get('area', t.area_names|join(', ')) %} {%- set area_colors = {} %}{% for a in form_areas %}{% set _ = area_colors.update({a.name|lower: a.color}) %}{% endfor %} {%- set chosen_areas = area_value.split(',')|map('trim')|select|list %} {%- set chosen_keys = chosen_areas|map('lower')|list %}
Areas
{%- for name in chosen_areas %}{{ name }}{% endfor -%}
{% if form_areas %}
{%- for a in form_areas %}{% endfor -%}
{% endif %}
v{{ t.version }}