luci-mod-system: system.js: expose use_dhcp NTP option
authorJo-Philipp Wich <jo@mein.io>
Tue, 24 Sep 2019 16:41:22 +0000 (18:41 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 24 Sep 2019 16:41:54 +0000 (18:41 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js

index ac6586af4692001da6a058134954a3b3d9f52fd3..415a6a175ea55545bf5dbdf7b527e00a610b5e07 100644 (file)
@@ -261,6 +261,11 @@ return L.view.extend({
                        o.ucisection = 'ntp';
                        o.depends('enabled', '1');
 
+                       o = s.taboption('timesync', form.Flag, 'use_dhcp', _('Use NTP servers offered by DHCP'));
+                       o.ucisection = 'ntp';
+                       o.default = o.enabled;
+                       o.depends('enabled', '1');
+
                        o = s.taboption('timesync', form.DynamicList, 'server', _('NTP server candidates'));
                        o.datatype = 'host(0)';
                        o.ucisection = 'ntp';