* luci/libs/cbi: implement addremove_template

This commit is contained in:
Jo-Philipp Wich 2008-10-10 11:47:32 +00:00
parent 7fe7d6d5e6
commit bfb5a53c45
3 changed files with 18 additions and 12 deletions

View file

@ -32,6 +32,7 @@ $Id$
<br /> <br />
</fieldset> </fieldset>
<% elseif self.addremove then %> <% elseif self.addremove then %>
<% if self.template_addremove then include(self.template_addremove) else -%>
<fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>"> <fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
<% if self.title and #self.title > 0 then -%> <% if self.title and #self.title > 0 then -%>
<legend><%=self.title%></legend> <legend><%=self.title%></legend>
@ -39,5 +40,6 @@ $Id$
<div class="cbi-section-descr"><%=self.description%></div> <div class="cbi-section-descr"><%=self.description%></div>
<input type="submit" class="cbi-button-add" name="cbi.cns.<%=self.config%>.<%=self.section%>" value="<%:cbi_add%>" /> <input type="submit" class="cbi-button-add" name="cbi.cns.<%=self.config%>.<%=self.section%>" value="<%:cbi_add%>" />
</fieldset> </fieldset>
<%- end %>
<% end %> <% end %>
<!-- /nsection --> <!-- /nsection -->

View file

@ -107,6 +107,7 @@ end
<% end %> <% end %>
<%- if self.addremove then -%> <%- if self.addremove then -%>
<% if self.template_addremove then include(self.template_addremove) else -%>
<div class="cbi-section-create"> <div class="cbi-section-create">
<% if self.anonymous then %> <% if self.anonymous then %>
<input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" title="<%:cbi_add%>" /> <input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" title="<%:cbi_add%>" />
@ -119,6 +120,7 @@ end
<%- end %> <%- end %>
<% end %> <% end %>
</div> </div>
<%- end %>
<%- end -%> <%- end -%>
</div> </div>
</fieldset> </fieldset>

View file

@ -41,6 +41,7 @@ $Id$
<%- end %> <%- end %>
<% if self.addremove then -%> <% if self.addremove then -%>
<% if self.template_addremove then include(self.template_addremove) else -%>
<div class="cbi-section-create"> <div class="cbi-section-create">
<% if self.anonymous then -%> <% if self.anonymous then -%>
<input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:cbi_add%>" /> <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:cbi_add%>" />
@ -54,4 +55,5 @@ $Id$
<%- end %> <%- end %>
</div> </div>
<%- end %> <%- end %>
<%- end %>
</fieldset> </fieldset>