From 4390b4dc7cf28b0ab52feb91e58513df31077203 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 29 Apr 2023 00:04:13 +0200 Subject: [PATCH] luci-app-ddns: order list of DDNS service providers Fixes: #6200 Signed-off-by: Jo-Philipp Wich (cherry picked from commit d9dcf98778f46f51d56d3df2a19a4245a0903b7c) --- .../htdocs/luci-static/resources/view/ddns/overview.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js b/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js index 5baac07d1a..1f0b373b3a 100644 --- a/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js +++ b/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js @@ -519,8 +519,7 @@ return view.extend({ service_name = s2.option(form.ListValue, 'service_name', String.format('%s', _("DDNS Service provider"))); service_name.value('-',"-- " + _("custom") + " --"); - for (var elem in _this.services) - service_name.value(elem); + Object.keys(_this.services).sort().forEach(name => service_name.value(name)); service_name.validate = function(section_id, value) { if (value == '') return _("Select a service"); if (s2.service_supported == null) return _("Checking the service support..."); @@ -642,8 +641,7 @@ return view.extend({ String.format('%s', _("DDNS Service provider"))); service_name.modalonly = true; service_name.value('-',"-- " + _("custom") + " --"); - for (var elem in _this.services) - service_name.value(elem); + Object.keys(_this.services).sort().forEach(name => service_name.value(name)); service_name.cfgvalue = function(section_id) { return uci.get('ddns', section_id, 'service_name') || '-'; }; -- 2.30.2