summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi')
-rw-r--r--libs/cbi/luasrc/view/cbi/button.htm6
-rw-r--r--libs/cbi/luasrc/view/cbi/nullsection.htm3
-rw-r--r--libs/cbi/luasrc/view/cbi/tblsection.htm8
3 files changed, 15 insertions, 2 deletions
diff --git a/libs/cbi/luasrc/view/cbi/button.htm b/libs/cbi/luasrc/view/cbi/button.htm
index 2d740f45c..c2a0d437e 100644
--- a/libs/cbi/luasrc/view/cbi/button.htm
+++ b/libs/cbi/luasrc/view/cbi/button.htm
@@ -13,5 +13,9 @@ $Id$
-%>
<%+cbi/valueheader%>
- <input<% if self.inputstyle then %> class="cbi-input-<%=self.inputstyle%>"<% end %> type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title) %> />
+ <% if self:cfgvalue(section) ~= false then %>
+ <input<% if self.inputstyle then %> class="cbi-input-<%=self.inputstyle%>"<% end %> type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title)%> />
+ <% else %>
+ -
+ <% end %>
<%+cbi/valuefooter%>
diff --git a/libs/cbi/luasrc/view/cbi/nullsection.htm b/libs/cbi/luasrc/view/cbi/nullsection.htm
index b01a6a9f5..476db96d8 100644
--- a/libs/cbi/luasrc/view/cbi/nullsection.htm
+++ b/libs/cbi/luasrc/view/cbi/nullsection.htm
@@ -13,6 +13,9 @@ $Id$
-%>
<fieldset class="cbi-section">
+ <% if self.title and #self.title > 0 then -%>
+ <legend><%=self.title%></legend>
+ <%- end %>
<div class="cbi-section-node">
<% self:render_children(1, scope or {}) %>
</div>
diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm
index d03d6f497..66de5aeb2 100644
--- a/libs/cbi/luasrc/view/cbi/tblsection.htm
+++ b/libs/cbi/luasrc/view/cbi/tblsection.htm
@@ -76,7 +76,13 @@ end
<%- if self.extedit or self.addremove then -%>
<td class="cbi-section-table-cell">
<%- if self.extedit then -%>
- <a href="<%=self.extedit:format(section)%>" title="<%:edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:edit%>" /></a>
+ <a href="
+ <%- if type(self.extedit) == "string" then -%>
+ <%=self.extedit:format(section)%>
+ <%- elseif type(self.extedit) == "function" then -%>
+ <%=self:extedit(section)%>
+ <%- end -%>
+ " title="<%:edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:edit%>" /></a>
<%- end; if self.addremove then %>
<input type="image" value="<%:cbi_del%>" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" />
<%- end -%>