diff options
author | Steven Barth <steven@midlink.org> | 2008-03-27 23:14:01 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-27 23:14:01 +0000 |
commit | 077db659bbcb7cee6bbc4c4dbaed9776261190a0 (patch) | |
tree | 0128ec76baf8112f2dd6538e0c5a9448cdf7d91a /src/ffluci/view/cbi/nsection.htm | |
parent | 3f1064b91949741af53eb1d198e228f768abaea8 (diff) |
* Major CBI improvements
Diffstat (limited to 'src/ffluci/view/cbi/nsection.htm')
-rw-r--r-- | src/ffluci/view/cbi/nsection.htm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm index 7615104ad7..c1f4c8bf3a 100644 --- a/src/ffluci/view/cbi/nsection.htm +++ b/src/ffluci/view/cbi/nsection.htm @@ -2,27 +2,30 @@ <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>"> <h2><%=self.title%></h2> <div class="cbi-section-descr"><%=self.description%></div> + <% if self.addremove then %><div class="cbi-section-remove"> + <input type="submit" name="cbi.rns.<%=self.config%>.<%=self.section%>" value="<%:cbi_del Eintrag entfernen%>" /> + </div><% end %> <fieldset class="cbi-section-node"> <% self:render_children(self.section) %> <% if #self.optionals[self.section] > 0 or self.dynamic then %> <div class="cbi-optionals"> + <input type="submit" value="<%:cbi_addopt Feld hinzufügen%>" /> <% if self.dynamic then %> <input type="text" name="cbi.opt.<%=self.config%>.<%=self.section%>" /> <% else %> <select name="cbi.opt.<%=self.config%>.<%=self.section%>"> <option><%:cbi_selopt *** Zusätzliche Parameter ***%></option> <% for key, val in pairs(self.optionals[self.section]) do %> - <option value="<%=val.option%>"><%=val.title%></option> + <option id="cbi-<%=self.config.."-"..self.section.."-"..val.option%>" value="<%=val.option%>"><%=val.title%></option> + <% if #val.deps > 0 then %><script type="text/javascript"> + <% for j, d in ipairs(val.deps) do %>cbi_d_add("cbi-<%=self.config.."-"..self.section.."-"..val.option%>", "cbid.<%=self.config.."."..self.section.."."..d.field%>", "<%=d.value%>"); + <% end %> + </script><% end %> <% end %> </select> <% end %> - <input type="submit" value="<%:cbi_addopt Feld hinzufügen%>" /> </div> <% end %> - <br /> - <% if self.addremove then %> - <input type="submit" name="cbi.rns.<%=self.config%>.<%=self.section%>" value="<%:cbi_del Eintrag entfernen%>" /> - <% end %> </fieldset> </div> <% elseif self.addremove then %> |