summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-07-31 23:22:10 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-07-31 23:22:10 +0000
commit68af07222ca541569d046d086c1f61510ca63a05 (patch)
tree0fd338b61528a1ebd964184a4de13c080c4043cd /libs
parent9827e9110582aa90e145da120f8ed2e1c1ed157a (diff)
libs/cbi: fix default property of ListValue fields
Diffstat (limited to 'libs')
-rw-r--r--libs/cbi/luasrc/view/cbi/lvalue.htm2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm
index c6b54128f..e27948a19 100644
--- a/libs/cbi/luasrc/view/cbi/lvalue.htm
+++ b/libs/cbi/luasrc/view/cbi/lvalue.htm
@@ -16,7 +16,7 @@ $Id$
<% if self.widget == "select" then %>
<select class="cbi-input-select" onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>>
<% for i, key in pairs(self.keylist) do -%>
- <option id="cbi-<%=self.config.."-"..section.."-"..self.option.."-"..key%>"<%= attr("value", key) .. ifattr(self:cfgvalue(section) == key, "selected", "selected") %>><%=striptags(self.vallist[i])%></option>
+ <option id="cbi-<%=self.config.."-"..section.."-"..self.option.."-"..key%>"<%= attr("value", key) .. ifattr((self:cfgvalue(section) or self.default) == key, "selected", "selected") %>><%=striptags(self.vallist[i])%></option>
<%- end %>
</select>
<% elseif self.widget == "radio" then