libs/cbi: attach pcdata() to template scope and use it
[project/luci.git] / libs / cbi / luasrc / view / cbi / dvalue.htm
index 54555bf..819860a 100644 (file)
@@ -12,15 +12,11 @@ You may obtain a copy of the License at
 $Id$
 
 -%>
+
 <%+cbi/valueheader%>
-<% if self.value then
-       if type(self.value) == "function" then %>
-       <%=self:value(section)%>
-<% else %>
-       <%=self.value%>
-<%     end
-else %>
-       <%=self:cfgvalue(section)%>
-<% end %>
-&nbsp;
+<% if self.href then %><a href="<%=self.href%>"><% end -%>
+       <%=pcdata(self:cfgvalue(section))%>
+<%- if self.href then %></a><%end%>
+&#160;
+<input type="hidden" id="<%=cbid%>" value="<%=pcdata(self:cfgvalue(section))%>" />
 <%+cbi/valuefooter%>