summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/cell_valueheader.htm')
-rw-r--r--modules/luci-base/luasrc/view/cbi/cell_valueheader.htm10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
index a4b68cda72..dbb0e1120b 100644
--- a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
+++ b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
@@ -1,2 +1,10 @@
-<div class="td cbi-value-field<% if self.error and self.error[section] then %> cbi-value-error<% end %>">
+<%-
+ local title = luci.util.trim(striptags(self.title))
+ local ftype = self.template and self.template:gsub("^.+/", "")
+-%>
+<div class="td cbi-value-field<% if self.error and self.error[section] then %> cbi-value-error<% end %>"<%=
+ attr("data-name", self.option) ..
+ ifattr(ftype and #ftype > 0, "data-type", ftype) ..
+ ifattr(title and #title > 0, "data-title", title)
+%>>
<div id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>">