summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view/cbi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-26 20:55:14 +0000
committerSteven Barth <steven@midlink.org>2008-03-26 20:55:14 +0000
commit68d142e79287e9b5e9f980f37b546070a38fc478 (patch)
tree8d165ffd6e50795b7f140efb0e7ed7f103d2e47d /src/ffluci/view/cbi
parent5f9910566de7165f4bb0ee62bc3ace53c708a94e (diff)
* CBI update
* Added some configuration pages * Introduced contact site * Introduced luci UCI config file
Diffstat (limited to 'src/ffluci/view/cbi')
-rw-r--r--src/ffluci/view/cbi/footer.htm5
-rw-r--r--src/ffluci/view/cbi/fvalue.htm2
-rw-r--r--src/ffluci/view/cbi/lvalue.htm10
-rw-r--r--src/ffluci/view/cbi/nsection.htm8
-rw-r--r--src/ffluci/view/cbi/tsection.htm10
-rw-r--r--src/ffluci/view/cbi/value.htm8
6 files changed, 19 insertions, 24 deletions
diff --git a/src/ffluci/view/cbi/footer.htm b/src/ffluci/view/cbi/footer.htm
index 230a17da86..d6e49678eb 100644
--- a/src/ffluci/view/cbi/footer.htm
+++ b/src/ffluci/view/cbi/footer.htm
@@ -1,5 +1,4 @@
- <hr class="cbi-form-separator" />
- <input type="submit" value="<%:cbi_save Speichern%>" />
- <input type="reset" value="<%:cbi_reset Zurücksetzen%>" />
+ <input type="submit" value="<%:save Speichern%>" />
+ <input type="reset" value="<%:reset Zurücksetzen%>" />
</form>
<%+footer%> \ No newline at end of file
diff --git a/src/ffluci/view/cbi/fvalue.htm b/src/ffluci/view/cbi/fvalue.htm
index 8c8a2dfba0..6cf9a8d87c 100644
--- a/src/ffluci/view/cbi/fvalue.htm
+++ b/src/ffluci/view/cbi/fvalue.htm
@@ -4,7 +4,7 @@
<div class="cbi-value-description"><%=self.description%></div>
</div>
<div class="cbi-value-field">
- <input type="checkbox" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:ucivalue(section) == self.enabled then %> checked="checked"<% end %> value="1" />
+ <input type="checkbox" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:cfgvalue(section) == self.enabled then %> checked="checked"<% end %> value="1" />
</div>
<div class="clear"></div>
</div> \ No newline at end of file
diff --git a/src/ffluci/view/cbi/lvalue.htm b/src/ffluci/view/cbi/lvalue.htm
index abe5080174..f2a5ff9750 100644
--- a/src/ffluci/view/cbi/lvalue.htm
+++ b/src/ffluci/view/cbi/lvalue.htm
@@ -1,20 +1,18 @@
<div class="cbi-value">
- <div class="left">
- <div class="cbi-value-title"><%=self.title%></div>
- <div class="cbi-value-description"><%=self.description%></div>
- </div>
+ <div class="cbi-value-title left"><%=self.title%></div>
+ <div class="cbi-value-description right"><%=self.description%></div>
<div class="cbi-value-field">
<% if self.widget == "select" then %>
<select name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self.size then %> size="<%=self.size%>"<% end %>>
<%for i, key in pairs(self.keylist) do%>
- <option<% if self:ucivalue(section) == key then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
+ <option<% if self:cfgvalue(section) == key then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
<% end %>
</select>
<% elseif self.widget == "radio" then
local c = 0;
for i, key in pairs(self.keylist) do
c = c + 1%>
- <%=self.vallist[i]%><input type="radio" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:ucivalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" />
+ <%=self.vallist[i]%><input type="radio" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" />
<% if c == self.size then c = 0 %><br />
<% end end %>
<% end %>
diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm
index 80dcefc07c..7615104ad7 100644
--- a/src/ffluci/view/cbi/nsection.htm
+++ b/src/ffluci/view/cbi/nsection.htm
@@ -1,17 +1,17 @@
-<% if self:ucivalue(self.section) then %>
+<% if self:cfgvalue(self.section) then %>
<div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
<h2><%=self.title%></h2>
<div class="cbi-section-descr"><%=self.description%></div>
<fieldset class="cbi-section-node">
<% self:render_children(self.section) %>
- <% if #self.optionals > 0 or self.dynamic then %>
+ <% if #self.optionals[self.section] > 0 or self.dynamic then %>
<div class="cbi-optionals">
<% 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 Felder ***%></option>
- <% for key, val in pairs(self.optionals) do %>
+ <option><%:cbi_selopt *** Zusätzliche Parameter ***%></option>
+ <% for key, val in pairs(self.optionals[self.section]) do %>
<option value="<%=val.option%>"><%=val.title%></option>
<% end %>
</select>
diff --git a/src/ffluci/view/cbi/tsection.htm b/src/ffluci/view/cbi/tsection.htm
index 26f8b198e8..9205095313 100644
--- a/src/ffluci/view/cbi/tsection.htm
+++ b/src/ffluci/view/cbi/tsection.htm
@@ -1,18 +1,18 @@
<div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
<h2><%=self.title%></h2>
<div class="cbi-section-descr"><%=self.description%></div>
-<% for k, v in pairs(self:ucisections()) do%>
+<% for k, v in pairs(self:cfgsections()) do%>
<fieldset class="cbi-section-node" id="cbi-<%=self.config%>-<%=k%>">
- <% if not self.anonymous then %><legend><%=k%></legend><% end %>
+ <% if not self.anonymous then %><h3><%=k%></h3><% end %>
<% self:render_children(k) %>
- <% if #self.optionals > 0 or self.dynamic then %>
+ <% if #self.optionals[k] > 0 or self.dynamic then %>
<div class="cbi-optionals">
<% if self.dynamic then %>
<input type="text" name="cbi.opt.<%=self.config%>.<%=k%>" />
<% else %>
<select name="cbi.opt.<%=self.config%>.<%=k%>">
- <option><%:cbi_selopt *** Zusätzliche Felder ***%></option>
- <% for key, val in pairs(self.optionals) do %>
+ <option><%:cbi_selopt *** Zusätzliche Parameter ***%></option>
+ <% for key, val in pairs(self.optionals[k]) do %>
<option value="<%=val.option%>"><%=val.title%></option>
<% end %>
</select>
diff --git a/src/ffluci/view/cbi/value.htm b/src/ffluci/view/cbi/value.htm
index 54ca720d90..ae4cd0eb59 100644
--- a/src/ffluci/view/cbi/value.htm
+++ b/src/ffluci/view/cbi/value.htm
@@ -1,10 +1,8 @@
<div class="cbi-value">
- <div class="left">
- <div class="cbi-value-title"><%=self.title%></div>
- <div class="cbi-value-description"><%=self.description%></div>
- </div>
+ <div class="cbi-value-title left"><%=self.title%></div>
+ <div class="cbi-value-description right"><%=self.description%></div>
<div class="cbi-value-field">
- <input type="text" <% if self.size then %>size="<%=self.size%>" <% end %><% if self.maxlength then %>maxlength="<%=self.maxlength%>" <% end %>name="cbid.<%=self.config.."."..section.."."..self.option%>" value="<%=(self:ucivalue(section) or "")%>" />
+ <input type="text" <% if self.size then %>size="<%=self.size%>" <% end %><% if self.maxlength then %>maxlength="<%=self.maxlength%>" <% end %>name="cbid.<%=self.config.."."..section.."."..self.option%>" value="<%=(self:cfgvalue(section) or "")%>" />
</div>
<div class="clear"></div>
<% if self.tag_invalid[section] then %><div class="cbi-error"><%:cbi_invalid Fehler: Ungültige Eingabe%></div><% end %>