diff options
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 2 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/full_valuefooter.htm | 2 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/full_valueheader.htm | 2 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/simpleform.htm | 5 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/tvalue.htm | 2 |
5 files changed, 8 insertions, 5 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index f7725c5348..399f486752 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -268,7 +268,7 @@ function SimpleForm.parse(self, ...) or valid and 1 or -1 - self.dorender = self:handle(state) + self.dorender = self:handle(state, self.data) end function SimpleForm.render(self, ...) diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm index 8933016d7d..a5a6046a5a 100644 --- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm +++ b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm @@ -17,7 +17,9 @@ $Id$ <span class="cbi-value-helpicon"><img src="<%=resource%>/cbi/help.gif" alt="<%:help%>" /></span> <div class="cbi-value-description"><%=self.description%></div> <%- end %> + <%- if self.title and #self.title > 0 then -%> </div> + <%- end -%> <% if self.tag_invalid[section] then -%> <div class="cbi-error"><%:cbi_invalid%></div> diff --git a/libs/cbi/luasrc/view/cbi/full_valueheader.htm b/libs/cbi/luasrc/view/cbi/full_valueheader.htm index 5b890ed0be..ddc256dc72 100644 --- a/libs/cbi/luasrc/view/cbi/full_valueheader.htm +++ b/libs/cbi/luasrc/view/cbi/full_valueheader.htm @@ -14,9 +14,11 @@ $Id$ -%> <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>"> + <%- if self.title and #self.title > 0 then -%> <label class="cbi-value-title"<%= attr("for", cbid) %>> <%- if self.titleref then -%><a title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%> <%-=self.title-%> <%- if self.titleref then -%></a><%- end -%> </label> <div class="cbi-value-field"> + <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/simpleform.htm b/libs/cbi/luasrc/view/cbi/simpleform.htm index 38df61b5f9..68c8cc9169 100644 --- a/libs/cbi/luasrc/view/cbi/simpleform.htm +++ b/libs/cbi/luasrc/view/cbi/simpleform.htm @@ -17,7 +17,6 @@ $Id$ <div> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> <input type="hidden" name="cbi.submit" value="1" /> - <input type="submit" value="<%:save%>" class="hidden" /> </div> <div class="cbi-map" id="cbi-<%=self.config%>"> <h1><%=self.title%></h1> @@ -32,12 +31,12 @@ $Id$ </div> <div> <%- if self.submit ~= false then %> - <input type="submit" value=" + <input class="cbi-button-save" type="submit" value=" <%- if not self.submit then -%><%-:submit-%><%-else-%><%=self.submit%><%end%> " /> <% end %> <%- if self.reset ~= false then %> - <input type="reset" value=" + <input class="cbi-button-reset" type="reset" value=" <%- if not self.reset then -%><%-:reset-%><%-else-%><%=self.reset%><%end%> " /> <% end %> diff --git a/libs/cbi/luasrc/view/cbi/tvalue.htm b/libs/cbi/luasrc/view/cbi/tvalue.htm index 6a1396886c..4d92545ae0 100644 --- a/libs/cbi/luasrc/view/cbi/tvalue.htm +++ b/libs/cbi/luasrc/view/cbi/tvalue.htm @@ -13,7 +13,7 @@ $Id$ -%> <%+cbi/valueheader%> - <textarea onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.size, "cols") .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") %>> + <textarea<% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") %>> <%-=luci.util.pcdata(self:cfgvalue(section))-%> </textarea> <%+cbi/valuefooter%> |