luci-mod-system: allow deleting all NTP servers

Fixes: #3121
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-27 12:01:41 +02:00
parent 111fdcef7f
commit ad05b61dce

View 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');
};
}