libs/lmo: remove cast in first lseek(), not needed since it's a constant expression
[project/luci.git] / libs / cbi / luasrc / view / cbi / ucisection.htm
index 4bd10b4..7e8467c 100644 (file)
@@ -13,6 +13,16 @@ $Id$
 
 -%>
 
+<%-
+       if type(self.hidden) == "table" then
+               for k, v in pairs(self.hidden) do
+-%>
+       <input type="hidden" id="cbid.<%=self.config%>.<%=section%>.<%=k%>" name="cbid.<%=self.config%>.<%=section%>.<%=k%>" value="<%=luci.util.pcdata(v)%>" />
+<%-
+               end
+       end
+%>
+
 <% self:render_children(section, scope or {}) %>
 
 <% if self.error and self.error[section] then -%>
@@ -31,7 +41,8 @@ $Id$
                                <%-
                                        for i, val in pairs(self.optionals[section]) do
                                -%>
-                                       <%-=string.format("%q", striptags(val.option)) .. ":" .. string.format("%q", val.title)-%>,
+                                       <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%>
+                                       <%-if next(self.optionals[section], i) then-%>,<%-end-%>
                                <%-
                                        end
                                -%>
@@ -39,7 +50,7 @@ $Id$
                        </script>
                        <% end %>
                <% else %>
-               <select name="cbi.opt.<%=self.config%>.<%=section%>">
+               <select id="cbi.opt.<%=self.config%>.<%=section%>" name="cbi.opt.<%=self.config%>.<%=section%>">
                        <option><%:cbi_addopt%></option>
                        <% for key, val in pairs(self.optionals[section]) do -%>
                                <option id="cbi-<%=self.config.."-"..section.."-"..val.option%>" value="<%=val.option%>"><%=striptags(val.title)%></option>
@@ -51,7 +62,8 @@ $Id$
                <%-
                        for k,v in pairs(d.deps) do
                -%>
-                       <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>,
+                       <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>
+                       <%-if next(d.deps, k) then-%>,<%-end-%>
                <%-
                        end
                -%>