luci-mod-network: fix look and feel for DNSMASQ IP-Sets generation
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 10 Apr 2024 09:50:57 +0000 (11:50 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 12 Apr 2024 06:46:08 +0000 (08:46 +0200)
On the configuration page of '/admin/network/dhcp' on the IP sets tab,
it is possible to make changes directly in the table. However, this is
not displayed correctly when using the theme 'luci-theme-material' if the
options can be changed directly in this view.

The problem is solved by not editing the configuration in the overview page
but in the overlay page.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index 7be024f68a300d43e0fe962415b531a23991a928..9a6240b69fb49065895e9efd379c7d8ec04cc349 100644 (file)
@@ -977,22 +977,22 @@ return view.extend({
 
                so = ss.option(form.DynamicList, 'name', _('Name of the set'));
                so.rmempty = false;
-               so.editable = true;
+               so.editable = false;
                so.datatype = 'string';
 
                so = ss.option(form.DynamicList, 'domain', _('FQDN'));
                so.rmempty = false;
-               so.editable = true;
+               so.editable = false;
                so.datatype = 'hostname';
 
                so = ss.option(form.Value, 'table', _('Netfilter table name'), _('Defaults to fw4.'));
-               so.editable = true;
+               so.editable = false;
                so.placeholder = 'fw4';
                so.rmempty = true;
 
                so = ss.option(form.ListValue, 'table_family', _('Table IP family'), _('Defaults to IPv4+6.') + ' ' + _('Can be hinted by adding 4 or 6 to the name.') + '<br />' +
                        _('Adding an IPv6 to an IPv4 set and vice-versa silently fails.'));
-               so.editable = true;
+               so.editable = false;
                so.rmempty = true;
                so.value('inet', _('IPv4+6'));
                so.value('ip', _('IPv4'));