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 <jo@mein.io>
This commit is contained in:
parent
3880c3f22f
commit
8a947ea550
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue