Add location field to devices with dropdown selector
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user