From 8a947ea550f7ab1cec89d1b1a8acf57be55e7199 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 30 Jul 2019 13:33:13 +0200 Subject: luci-base: ui.js: do not save invalid dynlist values Fixes: 3880c3f22 ("luci-base: ui.js: save filled out but not added dynlist items on submit") Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/ui.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 93e947d01..f6a964fb1 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -1334,6 +1334,7 @@ var UIDynamicList = UIElement.extend({ v.push(items[i].value); if (input && input.value != null && input.value.match(/\S/) && + input.classList.contains('cbi-input-invalid') == false && v.filter(function(s) { return s == input.value }).length == 0) v.push(input.value); -- cgit v1.2.3