summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/luasrc/view/cbi/dropdown.htm2
-rw-r--r--modules/luci-base/luasrc/view/cbi/dynlist.htm2
-rw-r--r--modules/luci-base/luasrc/view/cbi/lvalue.htm2
-rw-r--r--modules/luci-base/luasrc/view/cbi/tvalue.htm2
4 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/dropdown.htm b/modules/luci-base/luasrc/view/cbi/dropdown.htm
index 40bd8e953..95bd0d4bd 100644
--- a/modules/luci-base/luasrc/view/cbi/dropdown.htm
+++ b/modules/luci-base/luasrc/view/cbi/dropdown.htm
@@ -1,6 +1,6 @@
<%+cbi/valueheader%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
- "Dropdown", self:cfgvalue(section), self:choices(), {
+ "Dropdown", self:cfgvalue(section) or self.default, self:choices(), {
id = cbid,
name = cbid,
sort = self.keylist,
diff --git a/modules/luci-base/luasrc/view/cbi/dynlist.htm b/modules/luci-base/luasrc/view/cbi/dynlist.htm
index d50328d79..2a3da67ff 100644
--- a/modules/luci-base/luasrc/view/cbi/dynlist.htm
+++ b/modules/luci-base/luasrc/view/cbi/dynlist.htm
@@ -1,6 +1,6 @@
<%+cbi/valueheader%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
- "DynamicList", self:cfgvalue(section), self:choices(), {
+ "DynamicList", self:cfgvalue(section) or self.default, self:choices(), {
name = cbid,
size = self.size,
sort = self.keylist,
diff --git a/modules/luci-base/luasrc/view/cbi/lvalue.htm b/modules/luci-base/luasrc/view/cbi/lvalue.htm
index e07648835..920b5e9f9 100644
--- a/modules/luci-base/luasrc/view/cbi/lvalue.htm
+++ b/modules/luci-base/luasrc/view/cbi/lvalue.htm
@@ -1,6 +1,6 @@
<%+cbi/valueheader%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
- "Select", self:cfgvalue(section), self:choices(), {
+ "Select", self:cfgvalue(section) or self.default, self:choices(), {
id = cbid,
name = cbid,
size = self.size,
diff --git a/modules/luci-base/luasrc/view/cbi/tvalue.htm b/modules/luci-base/luasrc/view/cbi/tvalue.htm
index d1e9e6672..f3b12bd09 100644
--- a/modules/luci-base/luasrc/view/cbi/tvalue.htm
+++ b/modules/luci-base/luasrc/view/cbi/tvalue.htm
@@ -1,5 +1,5 @@
<%+cbi/valueheader%>
<textarea class="cbi-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") .. ifattr(self.readonly, "readonly") %>>
- <%-=pcdata(self:cfgvalue(section))-%>
+ <%-=pcdata(self:cfgvalue(section) or self.default)-%>
</textarea>
<%+cbi/valuefooter%>