Add location field to devices with dropdown selector

This commit is contained in:
2026-04-18 15:36:01 -05:00
parent 66062faac6
commit b90ab7b2b6
5 changed files with 79 additions and 3 deletions
+14
View File
@@ -39,6 +39,20 @@
style="display:{% if _cur_type and _cur_type not in _preset_types %}''{% else %}none{% endif %};margin-top:0.4rem;">
</div>
<div class="form-group">
<label>Location</label>
<select id="location-select" onchange="metaSelectChanged(this,'location')">
<option value="">— none —</option>
{% for loc in device_locations|default([]) %}
<option value="{{ loc }}">{{ loc }}</option>
{% endfor %}
<option value="__new__"> New location…</option>
</select>
<input type="text" id="location" name="location" value=""
placeholder="e.g. Living Room, Bedroom"
style="display:none;margin-top:0.4rem;">
</div>
<div class="form-group">
<label for="notes">Notes</label>
<textarea id="notes" name="notes" placeholder="Optional notes…">{{ form_notes|default('') }}</textarea>