diff options
author | Steven Barth <steven@midlink.org> | 2008-08-18 00:38:18 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-18 00:38:18 +0000 |
commit | 0c3fc70ddbf3f0fc0dcbb5d7c05285b0b2d12ccb (patch) | |
tree | f5c3216521c20271c776c13e52f40cf16dc1a6c3 /libs/cbi | |
parent | 39444086375b7451952b273b8c53ff48b6766706 (diff) |
Huuuuuuuuuuuge rewrite of the Wireless Configuration
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/view/cbi/button.htm | 6 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/nullsection.htm | 3 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/tblsection.htm | 8 |
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 2d740f45c0..c2a0d437e8 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 b01a6a9f58..476db96d87 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 d03d6f4971..66de5aeb2a 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 -%> |