summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/form.js2
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js2
-rw-r--r--modules/luci-base/luasrc/view/cbi/lvalue.htm2
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js
index 58d8f7100c..ef2f18e35a 100644
--- a/modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/modules/luci-base/htdocs/luci-static/resources/form.js
@@ -1460,7 +1460,7 @@ var CBIListValue = CBIValue.extend({
id: this.cbid(section_id),
size: this.size,
sort: this.keylist,
- optional: this.rmempty || this.optional,
+ optional: this.optional,
placeholder: this.placeholder,
validate: L.bind(this.validate, this, section_id)
});
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 43afc698f6..2ba0b0d1e8 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -243,7 +243,7 @@ var UISelect = UIElement.extend({
'multiple': this.options.multiple ? '' : null
}));
- if (this.options.optional)
+ if (this.options.optional || this.choices.hasOwnProperty(''))
frameEl.lastChild.appendChild(E('option', {
'value': '',
'selected': (this.values.length == 0 || this.values[0] == '') ? '' : null
diff --git a/modules/luci-base/luasrc/view/cbi/lvalue.htm b/modules/luci-base/luasrc/view/cbi/lvalue.htm
index 920b5e9f92..28141472f4 100644
--- a/modules/luci-base/luasrc/view/cbi/lvalue.htm
+++ b/modules/luci-base/luasrc/view/cbi/lvalue.htm
@@ -7,7 +7,7 @@
sort = self.keylist,
widget = self.widget,
datatype = self.datatype,
- optional = self.optional or self.rmempty,
+ optional = self.optional,
placeholder = self.placeholder
}
}))%>></div>