libs/cbi: attach pcdata() to template scope and use it
[project/luci.git] / libs / cbi / luasrc / view / cbi / full_valueheader.htm
index 40fce65..cbeda75 100644 (file)
@@ -12,6 +12,13 @@ You may obtain a copy of the License at
 $Id$
 
 -%>
-                                               <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
-                                                       <label for="cbid.<%=self.config.."."..section.."."..self.option%>" class="cbi-value-title"><%=self.title%></label>
-                                                       <div class="cbi-value-field">
\ No newline at end of file
+
+<div class="cbi-value<% if self.error and self.error[section] then %> cbi-value-error<% end %>" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
+       <%- if self.title and #self.title > 0 then -%>
+       <label class="cbi-value-title"<%= attr("for", cbid) %>>
+       <%- if self.titleref then -%><a title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
+               <%-=self.title-%>
+       <%- if self.titleref then -%></a><%- end -%>
+       </label>
+               <div class="cbi-value-field">
+       <%- end -%>