libs/cbi: attach pcdata() to template scope and use it
[project/luci.git] / libs / cbi / luasrc / view / cbi / tvalue.htm
index dcf6b8b..b628c5c 100644 (file)
@@ -13,7 +13,7 @@ $Id$
 
 -%>
 <%+cbi/valueheader%>
-       <textarea onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.size, "cols") .. ifattr(self.rows, "rows") %>>
-       <%-=luci.util.pcdata(self:cfgvalue(section))-%>
+       <textarea class="cbi-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") %>>
+       <%-=pcdata(self:cfgvalue(section))-%>
        </textarea>
 <%+cbi/valuefooter%>