{% import "components.html" as c with context %} {% import "agent_form.html" as f with context %} {# the agent as its computer holds it, one page of cards under headings; saved, it comes back as the computer now holds it #} {% set base = "/agents/" ~ ref(selected.computer_id) ~ "/" ~ ref(selected.id) ~ "/profile" %} {% if values is none %}

{{ t.text("agents." ~ held.answer, {"code": held.code}) if held.answer != "listed" else t.text("agents.gone") }}

{% else %}
{{ f.initial(values, reply, kept=true, origins=origins if origins is defined else none) }}
{{ t.text("agents.step.basic") }}
{{ f.basic(values) }}
{{ t.text("contacts.reply") }}
{{ f.reply(reply) }}
{{ t.text("agents.step.channels") }}
{{ f.deck("channel", "agent-config-" ~ ref(selected.id)) }}
{{ t.text("agents.step.runtimes") }}
{{ f.deck("runtime", "agent-config-" ~ ref(selected.id)) }} {% if failed %}

{{ t.text("agents." ~ failed.partition(":")[0], {"code": failed.partition(":")[2] or none}) }}

{% endif %} {% if saved %}

{{ t.text("agents.saved") }}

{% endif %} {% if permissions.AGENTS_UPDATE in selected.actions %}
{% endif %} {% endif %} {% if permissions.AGENTS_DELETE in selected.actions %}

{{ t.text("agents.remove") }}

{{ t.text("agents.remove_hint") }}

{% endif %} {% if saved %}{% with name = head.name, selected = head, oob = true %}{% include "agent_profile_head.html" %}{% endwith %}{% endif %}