{% extends 'admin_panel/base.html' %} {% import 'macros/autoform.html' as autoform %} {% import 'macros/form.html' as form %} {% block breadcrumb_content %}
  • {% link_for _("Global settings"), named_route='mailcraft.config' %}
  • {% endblock breadcrumb_content %} {% block ap_content %}

    {{ _("Mailcraft configuration") }}

    {% for _, config in configs.items() %} {% if config.type == "select" %} {{ form.select(config.key, label=config.label, options=config.options, selected=data[config.key] | int if data else config.value, error=errors[config.key]) }} {% elif config.type in ("text", "number") %} {{ form.input(config.key, label=config.label, value=data[config.key] if data else config.value, error=errors[config.key], type=config.type) }} {% else %} {{ form.textarea(config.key, label=config.label, value=data[config.key] if data else config.value, error=errors[config.key]) }} {% endif %} {% endfor %}
    {% endblock ap_content %}