From a83427fefe497fcda92a3f9b59701dc91a6f1df1 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Tue, 9 Jan 2024 03:21:20 +0000 Subject: luci-app-https-dns-proxy: bugfix: editing providers with options * fixes https://github.com/openwrt/luci/issues/6811 * previously editing existing provider instance with options would not result in the correct saving of edited parameters Signed-off-by: Stan Grishin --- .../htdocs/luci-static/resources/view/https-dns-proxy/overview.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'applications/luci-app-https-dns-proxy/htdocs/luci-static') diff --git a/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js b/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js index a9bc25b905..253525fb4a 100644 --- a/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js +++ b/applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js @@ -297,8 +297,8 @@ return view.extend({ section_id, "resolver_url" ); - if (_paramList.template !== template) return 0; - let resolver = pkg.templateToResolver(template, { + if (!formvalue && _paramList.template !== template) return 0; + let resolver = pkg.templateToResolver(_paramList.template, { option: formvalue || "", }); L.uci.set(pkg.Name, section_id, "resolver_url", resolver); @@ -335,8 +335,8 @@ return view.extend({ section_id, "resolver_url" ); - if (_paramText.template !== template) return 0; - let resolver = pkg.templateToResolver(template, { + if (!formvalue && _paramText.template !== template) return 0; + let resolver = pkg.templateToResolver(_paramText.template, { option: formvalue || "", }); L.uci.set(pkg.Name, section_id, "resolver_url", resolver); -- cgit