luci-base: add default value options dhcp hostname
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 16 Sep 2020 15:16:39 +0000 (17:16 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Wed, 16 Sep 2020 15:19:50 +0000 (17:19 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js

index efdb818c454b1dcc356df60ef106727a0f9659c3..28f06ecb8cfaca4e3c8af56552b1cb1a66daa259 100644 (file)
@@ -20,6 +20,9 @@ return network.registerProtocol('dhcp', {
                var dev = this.getL2Device() || this.getDevice(), o;
 
                o = s.taboption('general', form.Value, 'hostname', _('Hostname to send when requesting DHCP'));
+               o.default = '';
+               o.value('', 'Send the hostname of this device');
+               o.value('*', 'Do not send a hostname');
                o.datatype    = 'or(hostname, "*")';
                o.load = function(section_id) {
                        return callFileRead('/proc/sys/kernel/hostname').then(L.bind(function(hostname) {