feat: replace Dynamic DNS YAML editor with a web form
Adds structured form fields for nsupdate_bin, rndc_key, and dyndomains (comma-separated list). Wires list-type editable fields through the generic stageFormSection path and adds DNS support to apply_structured_section in configio. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -820,6 +820,11 @@
|
||||
<input type="number" class="field-input"
|
||||
data-key="{{ f.key }}" data-type="{{ f.type }}" data-section="{{ section.api_section }}"
|
||||
value="{{ f.raw if f.raw is not none else '' }}">
|
||||
{% elif f.type == 'list' %}
|
||||
<input type="text" class="field-input"
|
||||
data-key="{{ f.key }}" data-type="list" data-section="{{ section.api_section }}"
|
||||
value="{{ f.value | join(', ') if f.value else '' }}"
|
||||
placeholder="comma-separated">
|
||||
{% else %}
|
||||
<input type="text" class="field-input"
|
||||
data-key="{{ f.key }}" data-section="{{ section.api_section }}"
|
||||
@@ -1023,6 +1028,8 @@
|
||||
} else if (el.dataset.type === 'number' || el.dataset.type === 'port') {
|
||||
const v = parseInt(el.value, 10);
|
||||
_staged[apiSection][key] = isNaN(v) ? null : v;
|
||||
} else if (el.dataset.type === 'list') {
|
||||
_staged[apiSection][key] = el.value.split(',').map(s => s.trim()).filter(Boolean);
|
||||
} else {
|
||||
_staged[apiSection][key] = el.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user