libs/cbi: properly handle .default for dummy values
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 8 Nov 2009 02:29:05 +0000 (02:29 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 8 Nov 2009 02:29:05 +0000 (02:29 +0000)
libs/cbi/luasrc/view/cbi/dvalue.htm

index 819860a065dfdf17c7f4e16a38b6881edf935c69..9745fff4cbbae4d801251502a60ac0a31017e0fb 100644 (file)
@@ -15,8 +15,8 @@ $Id$
 
 <%+cbi/valueheader%>
 <% if self.href then %><a href="<%=self.href%>"><% end -%>
-       <%=pcdata(self:cfgvalue(section))%>
+       <%=pcdata(self:cfgvalue(section) or self.default or "")%>
 <%- if self.href then %></a><%end%>
 &#160;
-<input type="hidden" id="<%=cbid%>" value="<%=pcdata(self:cfgvalue(section))%>" />
+<input type="hidden" id="<%=cbid%>" value="<%=pcdata(self:cfgvalue(section) or self.default or "")%>" />
 <%+cbi/valuefooter%>