From 5b955f1ae922e37ec6bc07599d547aa9c3a5ebf1 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Thu, 15 Feb 2024 23:07:31 +0100 Subject: luci-mod-network: dhcp: separate actual value and display string saved value will now be only an integer. Signed-off-by: Paul Donald --- .../htdocs/luci-static/resources/view/network/dhcp.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/luci-mod-network/htdocs') diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 7b0ae3c1f9..2006657f0f 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -800,7 +800,8 @@ return view.extend({ so.optional = true; Object.values(L.uci.sections('dhcp', 'dnsmasq')).forEach(function(val, index) { - so.value(generateDnsmasqInstanceEntry(val)); + var name, display_str = generateDnsmasqInstanceEntry(val); + so.value(index, display_str); }); o = s.taboption('srvhosts', form.SectionValue, '__srvhosts__', form.TableSection, 'srvhost', null, @@ -1078,7 +1079,8 @@ return view.extend({ so.optional = true; Object.values(L.uci.sections('dhcp', 'dnsmasq')).forEach(function(val, index) { - so.value(generateDnsmasqInstanceEntry(val)); + var name, display_str = generateDnsmasqInstanceEntry(val); + so.value(index, display_str); }); -- cgit v1.2.3