{% extends "base.html" %}
{% block title %}{{ title }} - {{ shell.brand }}{% endblock %}
{% block content %}
<div class="lat-toolbar"><h1>{{ title }}</h1></div>
<div class="lat-card" style="max-width:620px">
{% if !description.is_empty() %}<p style="color:var(--text-muted);font-size:var(--fs-13);margin:0 0 18px">{{ description }}</p>{% endif %}
{% if let Some(message) = error %}<div class="lat-alert">{{ message }}</div>{% endif %}
<form method="post" action="{{ action }}">
{% include "_csrf.html" %}
{# Each control is rendered by its own field type, the same way a descriptor
form renders: one field system, so a module's type works on both. #}
{% for field in fields %}
<div class="lat-field">
<label class="lat-field__label">{{ field.label }}</label>
{{ field.control|safe }}
{% if let Some(help) = field.help %}<p class="lat-help">{{ help }}</p>{% endif %}
</div>
{% endfor %}
<div class="lat-actions">
<button class="lat-btn lat-btn--primary" type="submit">{{ shell.t("Save") }}</button>
<a class="lat-btn lat-btn--ghost" href="{{ shell.base }}/settings">{{ shell.t("Cancel") }}</a>
</div>
</form>
</div>
{% endblock %}