diff options
Diffstat (limited to 'src/ffluci/view')
-rw-r--r-- | src/ffluci/view/cbi/lvalue.htm | 20 | ||||
-rw-r--r-- | src/ffluci/view/cbi/map.htm | 15 | ||||
-rw-r--r-- | src/ffluci/view/cbi/nsection.htm | 10 | ||||
-rw-r--r-- | src/ffluci/view/cbi/tsection.htm | 18 | ||||
-rw-r--r-- | src/ffluci/view/cbi/value.htm | 14 |
5 files changed, 41 insertions, 36 deletions
diff --git a/src/ffluci/view/cbi/lvalue.htm b/src/ffluci/view/cbi/lvalue.htm index eb2eac2fd..6a9941959 100644 --- a/src/ffluci/view/cbi/lvalue.htm +++ b/src/ffluci/view/cbi/lvalue.htm @@ -1,11 +1,11 @@ -<div class="cbi-lvalue"> -<div class="cbi-lvalue-title"><%=self.title%></div> -<div class="cbi-lvalue-field"> -<select name="<%=self.config.."."..self.section.."."..self.option%>"> -<%for k, v in self.list do%> -<option value="<%=k%>"><%=v%></option> + <div class="cbi-lvalue"> + <div class="cbi-lvalue-title"><%=self.title%></div> + <div class="cbi-lvalue-field"> + <select name="cbid.<%=self.config.."."..self.section.."."..self.option%>"> +<%for k, v in pairs(self.list) do%> + <option value="<%=k%>"><%=v%></option> <% end %> -</select> -</div> -<div class="cbi-value-description"><%=self.description%></div> -</div>
\ No newline at end of file + </select> + </div> + <div class="cbi-value-description"><%=self.description%></div> + </div>
\ No newline at end of file diff --git a/src/ffluci/view/cbi/map.htm b/src/ffluci/view/cbi/map.htm index e4f493bd0..b724ffccb 100644 --- a/src/ffluci/view/cbi/map.htm +++ b/src/ffluci/view/cbi/map.htm @@ -1,7 +1,10 @@ -<div class="cbi-map" id="cbi-<%=self.config%>"> -<form method="post" action="<%=os.getenv("REQUEST_URI")%>"> -<h1><%=self.title%></h1> -<div class="cbi-map-descr"><%=self.description%></div> + <div class="cbi-map" id="cbi-<%=self.config%>"> + <form method="post" action="<%=os.getenv("REQUEST_URI")%>"> + <h1><%=self.title%></h1> + <div class="cbi-map-descr"><%=self.description%></div> + <br /> <% for k, node in ipairs(self.children) do node:render() end %> -</form> -</div> + <br /> + <input type="submit" /> <input type="reset" /> + </form> + </div> diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm index 5badeca56..e002c68b0 100644 --- a/src/ffluci/view/cbi/nsection.htm +++ b/src/ffluci/view/cbi/nsection.htm @@ -1,5 +1,7 @@ -<div class="cbi-nsection" id="cbi-<%=self.config%>-<%=self.sectiontype%>-<%=self.section%>"> -<h2><%=self.title%></h2> -<div class="cbi-nsection-descr"><%=self.description%></div> + <div class="cbi-nsection" id="cbi-<%=self.config%>-<%=self.section%>"> + <h2><%=self.title%></h2> + <div class="cbi-nsection-descr"><%=self.description%></div> + <div class="cbi-nsection-options"> <% for k, node in ipairs(self.children) do node:render() end %> -</div> + </div> + </div> diff --git a/src/ffluci/view/cbi/tsection.htm b/src/ffluci/view/cbi/tsection.htm index 8c7f0c115..b613f6271 100644 --- a/src/ffluci/view/cbi/tsection.htm +++ b/src/ffluci/view/cbi/tsection.htm @@ -2,20 +2,20 @@ local allsections = self.map:read() local sections = {} for k, v in pairs(allsections) do - if v[".type"] == sectiontype then + if v[".type"] == self.sectiontype then sections[k] = v end end %> -<div class="cbi-tsection" id="cbi-<%=self.config%>-<%=self.sectiontype%>"> -<h2><%=self.title%></h2> -<div class="cbi-tsection-descr"><%=self.description%></div> + <div class="cbi-tsection" id="cbi-<%=self.config%>-<%=self.sectiontype%>"> + <h2><%=self.title%></h2> + <div class="cbi-tsection-descr"><%=self.description%></div> <% for k, v in pairs(sections) do %> -<div class="cbi-tsection-node" id="cbi-<%=self.config%>-<%=k%>"> -<% for k, node in ipairs(self.children) do + <div class="cbi-tsection-node" id="cbi-<%=self.config%>-<%=k%>"> +<% for i, node in ipairs(self.children) do node.section = k - node:render(k) + node:render() end %> -</div> + </div> <% end %> -</div> + </div> diff --git a/src/ffluci/view/cbi/value.htm b/src/ffluci/view/cbi/value.htm index cc22c4e56..a898d08c1 100644 --- a/src/ffluci/view/cbi/value.htm +++ b/src/ffluci/view/cbi/value.htm @@ -1,7 +1,7 @@ -<div class="cbi-value"> -<div class="cbi-value-title"><%=self.title%></div> -<div class="cbi-value-field"> -<input type="text" name="<%=self.config.."."..self.section.."."..self.option%>" value="<%=self:ucivalue()%>" /> -</div> -<div class="cbi-value-description"><%=self.description%></div> -</div>
\ No newline at end of file + <div class="cbi-value"> + <div class="cbi-value-title"><%=self.title%></div> + <div class="cbi-value-field"> + <input type="text" name="cbid.<%=self.config.."."..self.section.."."..self.option%>" value="<%=(self:ucivalue() or "")%>" /> + </div> + <div class="cbi-value-description"><%=self.description%></div> + </div>
\ No newline at end of file |