luci-mod-system: allow deleting all NTP servers
authorJo-Philipp Wich <jo@mein.io>
Fri, 27 Sep 2019 10:01:41 +0000 (12:01 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 27 Sep 2019 10:02:08 +0000 (12:02 +0200)
Fixes: #3121
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js

index 18af222d29c082e10589a0640e6fb18a36c43029..6563bf4638f0a58cd6957ac82282ff90e19d1fb1 100644 (file)
@@ -270,11 +270,8 @@ return L.view.extend({
                        o.datatype = 'host(0)';
                        o.ucisection = 'ntp';
                        o.depends('enabled', '1');
-                       o.remove = function() {}; // retain server list even if disabled
                        o.load = function(section_id) {
-                               return uci.get('system', 'ntp')
-                                       ? uci.get('system', 'ntp', 'server')
-                                       : default_servers;
+                               return uci.get('system', 'ntp', 'server');
                        };
                }