{% extends "base.html" %} {% block title %}{{ section | capitalize }} ยท snapdelta{% endblock %} {% block content %}

Admin

{% include "_admin_nav.html" %} {% if saved %}

Saved to {{ saved }}.{% if restart %} The address, the port and the access change at the next start of snapdelta-web.{% endif %}

{% endif %} {% if deleted %}

Deleted the profile {{ deleted }} from {{ file }}.

{% endif %} {% if failure %}

Not saved: {{ failure }}

{% endif %} {% if errors %}

Not saved: correct the values in red.

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

{{ warning }}

{% endfor %}

{% if file %}Settings file in use: {{ file }}.{% else %}No settings file: the defaults apply. A save creates {{ target_file }}.{% endif %} An empty field takes its default.{% if section == "profiles" %} The names of the models and attributes are in Models.{% endif %}

{% if section == "settings" %}{% endif %} {% if section == "profiles" %}
{% if new_profile_field in errors %}

{{ errors[new_profile_field] }}

{% endif %}
{% endif %}
{% for group in groups %} {% set profile_name = group.table.removeprefix("profiles.") if section == "profiles" else none %}
{{ group.title }} {% if profile_name %}{% endif %} {% for field in group.fields %} {% set value = posted[field.key] if posted is not none and field.key in posted else field.value %}
{% if field.help %}?{% endif %}
{% if field.kind == "bool" %} {% elif field.kind == "secret" %}
{% if field.secret %}{% endif %}
Now: {{ field.secret.describe() if field.secret else "not set" }}. Both empty keeps it. {% elif field.kind == "choice" %} {% elif field.kind == "list" %} {% elif field.kind == "table" %} {% else %} {% endif %} {% if field.note %}In use: {{ field.in_use }}, from {{ field.note }}, which wins over this file.{% endif %} {% if field.key in errors %}

{{ errors[field.key] }}

{% endif %}
{% if section == "settings" %}{{ field.origin }}{% endif %}
{% endfor %}
{% endfor %}
{% for group in groups if section == "profiles" %} {% set profile_name = group.table.removeprefix("profiles.") %}
{% endfor %} {% endblock %}