* luci/libs: only create <legend> if there is a title in tblsection template
[project/luci.git] / libs / cbi / luasrc / view / cbi / tblsection.htm
index d4effef..3630408 100644 (file)
@@ -21,8 +21,10 @@ end
 -%>
 
 <!-- tblsection -->
-<div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
-       <h2><%=self.title%></h2>
+<fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
+       <% if self.title and #self.title > 0 then -%>
+               <legend><%=self.title%></legend>
+       <%- end %>
        <div class="cbi-section-descr"><%=self.description%></div>
        <div class="cbi-section-node">
                <%- local count = 0 -%>
@@ -104,5 +106,5 @@ end
                        </div>
                        <%- end -%>
        </div>
-</div>
+</fieldset>
 <!-- /tblsection -->