Add brand autocomplete dropdown to battery add and device install forms

Uses HTML datalist populated from distinct brands in the battery table.
Removed autocomplete="off" which suppresses datalist in Chrome/Chromium.
This commit is contained in:
2026-04-12 13:31:19 -05:00
parent 1f5234a3e9
commit 709e0d6119
3 changed files with 16 additions and 5 deletions
+4 -1
View File
@@ -9,7 +9,10 @@
<div class="form-group">
<label for="brand">Brand <span class="text-danger">*</span></label>
<input type="text" id="brand" name="brand" value="{{ form_brand|default('') }}"
placeholder="e.g. Panasonic Eneloop" required>
placeholder="e.g. Panasonic Eneloop" list="brand-list" required>
<datalist id="brand-list">
{% for b in brands|default([]) %}<option value="{{ b }}">{% endfor %}
</datalist>
</div>
<div class="form-group">