projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3880c3f
)
luci-base: ui.js: do not save invalid dynlist values
author
Jo-Philipp Wich
<jo@mein.io>
Tue, 30 Jul 2019 11:33:13 +0000
(13:33 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 30 Jul 2019 11:33:46 +0000
(13:33 +0200)
Fixes: 3880c3f22 ("luci-base: ui.js: save filled out but not added dynlist items on submit")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/ui.js
b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 93e947d01d4feaf5109026cb07ec47e2e3cc44bc..f6a964fb10b4247351fd4c3f74aeeca17694a57e 100644
(file)
--- 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);