summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 2ba0b0d1e8..f6a964fb10 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -1327,11 +1327,17 @@ var UIDynamicList = UIElement.extend({
getValue: function() {
var items = this.node.querySelectorAll('.item > input[type="hidden"]'),
+ input = this.node.querySelector('.add-item > input[type="text"]'),
v = [];
for (var i = 0; i < items.length; i++)
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);
+
return v;
},