Suggest existing categories/manufacturers when editing

The category and manufacturer fields in the edit form now offer the
already-used values via a datalist dropdown, while still allowing a
new value to be typed. Both edit entry points (open edit form and AI
re-describe) pass the current lists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Erik Thiele
2026-07-20 22:13:08 +02:00
parent fdfddf8ccf
commit 8e9b49e57b
2 changed files with 25 additions and 6 deletions

View File

@@ -21,11 +21,21 @@
<div style="display:flex; gap:12px; flex-wrap:wrap;">
<div class="field" style="flex:1 1 160px;">
<label>Kategorie</label>
<input type="text" name="category" value="{{ link.category }}">
<input type="text" name="category" value="{{ link.category }}"
list="cats-{{ link.id }}" placeholder="wählen oder neu eingeben"
autocomplete="off">
<datalist id="cats-{{ link.id }}">
{% for name in all_categories %}<option value="{{ name }}"></option>{% endfor %}
</datalist>
</div>
<div class="field" style="flex:1 1 160px;">
<label>Hersteller / Quelle</label>
<input type="text" name="manufacturer" value="{{ link.manufacturer }}">
<input type="text" name="manufacturer" value="{{ link.manufacturer }}"
list="mans-{{ link.id }}" placeholder="wählen oder neu eingeben"
autocomplete="off">
<datalist id="mans-{{ link.id }}">
{% for name in all_manufacturers %}<option value="{{ name }}"></option>{% endfor %}
</datalist>
</div>
</div>