luci-base: dhcp.js: allow hostname to be "*"
authorJo-Philipp Wich <jo@mein.io>
Wed, 16 Sep 2020 08:23:35 +0000 (10:23 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 16 Sep 2020 08:23:35 +0000 (10:23 +0200)
Fixes: #4430
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js

index f0a3ec579c2e8d98cdcab91b0df8111ddb8504d3..efdb818c454b1dcc356df60ef106727a0f9659c3 100644 (file)
@@ -20,7 +20,7 @@ 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.datatype    = 'hostname';
+               o.datatype    = 'or(hostname, "*")';
                o.load = function(section_id) {
                        return callFileRead('/proc/sys/kernel/hostname').then(L.bind(function(hostname) {
                                this.placeholder = hostname;