Includes atomic migrations, per-rule reminder semantics, first-run helper script and the note on the undecided UI chat idea. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
45 lines
2.3 KiB
HTML
45 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}{{ section.title }}{% endblock %}
|
||
{% block content %}
|
||
<h1>{{ section.title }}</h1>
|
||
{% if section.notice %}<div class="flash error" role="note">{{ section.notice }}</div>{% endif %}
|
||
<section class="card">
|
||
<form method="post" action="/settings/{{ section.slug }}">
|
||
{{ csrf_input }}
|
||
{% for field in section.fields %}
|
||
{% if field.kind == "checkbox" %}
|
||
<label class="check">
|
||
<input type="checkbox" name="{{ field.name }}" value="1" {% if values[field.name] %}checked{% endif %}>
|
||
{{ field.label }}
|
||
</label>
|
||
{% elif field.kind == "select" %}
|
||
<label for="f-{{ field.name }}">{{ field.label }}</label>
|
||
<select id="f-{{ field.name }}" name="{{ field.name }}">
|
||
{% for value, text in field.choices %}<option value="{{ value }}" {% if values[field.name] == value or (not values[field.name] and value == field.default) %}selected{% endif %}>{{ text }}</option>{% endfor %}
|
||
</select>
|
||
{% elif field.secret %}
|
||
<label for="f-{{ field.name }}">{{ field.label }}{% if field.required %} *{% endif %}</label>
|
||
<input id="f-{{ field.name }}" name="{{ field.name }}" type="password" value="" autocomplete="new-password"
|
||
placeholder="{{ 'gesetzt – leer lassen zum Behalten' if secret_set.get(field.name) else field.placeholder }}">
|
||
{% else %}
|
||
<label for="f-{{ field.name }}">{{ field.label }}{% if field.required %} *{% endif %}</label>
|
||
<input id="f-{{ field.name }}" name="{{ field.name }}" type="text" value="{{ values[field.name] }}"
|
||
placeholder="{{ field.placeholder }}" autocomplete="off" autocapitalize="none">
|
||
{% endif %}
|
||
{% if field.hint %}<p class="muted">{{ field.hint }}</p>{% endif %}
|
||
{% endfor %}
|
||
<div class="actions">
|
||
<button type="submit">Speichern</button>
|
||
{% if section.test %}
|
||
<button type="button" class="secondary" data-test-url="/settings/{{ section.slug }}/test">Verbindung testen</button>
|
||
{% endif %}
|
||
{% for action in section.actions %}
|
||
<button type="button" class="secondary" data-test-url="{{ action.path }}">{{ action.label }}</button>
|
||
{% endfor %}
|
||
</div>
|
||
<p class="test-result" aria-live="polite"></p>
|
||
</form>
|
||
</section>
|
||
{% if section.extra_template %}{% include section.extra_template %}{% endif %}
|
||
{% endblock %}
|